This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ============================================= | |
| -- Computes and returns the Levenshtein edit distance between two strings, i.e. the | |
| -- number of insertion, deletion, and sustitution edits required to transform one | |
| -- string to the other, or NULL if @max is exceeded. Comparisons use the case- | |
| -- sensitivity configured in SQL Server (case-insensitive by default). | |
| -- http://blog.softwx.net/2014/12/optimizing-levenshtein-algorithm-in-tsql.html | |
| -- | |
| -- See http://en.wikipedia.org/wiki/Levenshtein_distance | |
| -- This is based on Sten Hjelmqvist's "Fast, memory efficient" algorithm, described | |
| -- at http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less | |
| # Tries to use chocolatey to install imdisk | |
| # Sample use case: | |
| # Import-Module ".\mount.iso.psm1" | |
| # Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive" | |
| function Mount-Iso([string] $isoPath) | |
| { | |
| if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Floaters Playground | |
| // Xcode 7.2 (7C68) | |
| // Illustrating Frustration with Swift Floating Point numbers. Especially annoying in the context of CoreData and JSON | |
| import UIKit | |
| import Foundation | |
| //: Lets start with a Float | |
| let float1 : Float = 9.39 | |
| print(float1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script automatically sets the version and short version string of | |
| # an Xcode project from the Git repository containing the project. | |
| # | |
| # To use this script in Xcode, add the script's path to a "Run Script" build | |
| # phase for your application target. | |
| set -o errexit | |
| set -o nounset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| . C:\ttdata\PowerShell\lib\byteMe.ps1 | |
| $bytes = Convert-HexStringToByteArray -String "0x" | |
| $bf = New-Object System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |
| $ms = New-Object System.IO.MemoryStream -ArgumentList @(,$bytes) | |
| $val = $bf.Deserialize($ms) | |
| $val |