Skip to content

Instantly share code, notes, and snippets.

@jstemmer
jstemmer / odbctests.go
Last active December 22, 2015 15:49
ODBC sql parameter testcases
var paramTests = []struct {
description string
sqlType string
value interface{}
}{
{"empty string", "varchar(10)", ""},
{"NULL for TEXT", "text", nil},
{"large string value", "text", strings.Repeat("a", 10000)},
{"datetime overflow", "datetime", time.Date(2013, 9, 9, 14, 07, 15, 123, time.UTC)},
}
@jstemmer
jstemmer / main.go
Last active December 22, 2015 10:49
ODBC driver panic when executing a prepared statement
package main
import (
_ "code.google.com/p/odbc"
"database/sql"
"log"
)
func main() {
db, err := sql.Open("odbc", "DSN=xstreamds")
@jstemmer
jstemmer / example.xml
Created December 14, 2011 14:25
file causing a StringIndexOutOfBoundsException in lint
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout>
<LinearLayout></LinearLayout>
</LinearLayout>
@jstemmer
jstemmer / apache-configuration-fail
Created October 19, 2010 19:44
passenger3: Error message: No such file to load -- application Exception class: LoadError
<VirtualHost *:80>
DocumentRoot /var/www/ptest
<Directory /var/www/ptest>
AllowOverride all
Options -MultiViews
</Directory>
RailsBaseURI /ptest
</VirtualHost>