Skip to content

Instantly share code, notes, and snippets.

@wroge
wroge / benchmark_test.go
Last active September 13, 2022 10:38
Benchmark bokwoon95/sq vs wroge/scan
package main_test
import (
"database/sql"
"encoding/json"
"testing"
"github.com/bokwoon95/sq"
"github.com/wroge/scan"
)
@wroge
wroge / surveyjs.yaml
Last active May 29, 2020 10:22
SurveyJS OpenAPI 3.0.0 Definition
components:
schemas:
AnswerCountValidator:
properties:
maxCount:
maximum: 255
minimum: 0
type: integer
minCount:
maximum: 255
@wroge
wroge / schema.cue
Last active June 2, 2020 09:51
SurveyJS Cuelang Definition
#Schema: {
data?: {[string]: #Any}
allowCompleteAutomatic?: bool
calculatedValues?: [...#CalculatedValue]
checkErrorsMode?: "onNextPage" | "onValueChanged" | "onComplete"
clearInvisibleValues?: "none" | "onHidden" | "onComplete"
clearValueOnDisableItems?: bool
clientId?: string
commentPrefix?: string
completedBeforeHtml?: string | #LocaleString
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SurveyJS Library json schema",
"type": "object",
"properties": {
"pages": {
"type": "array",
"items": {
"$ref": "#/definitions/page"
}
package main
import (
"fmt"
"github.com/wroge/wgs84"
)
func main() {
mgi := wgs84.Helmert(6377397.155, 299.1528128, 577.326, 90.129, 463.919, 5.137, 1.474, 5.297, 2.4232)
package main
import (
"fmt"
"github.com/wroge/wgs84"
)
func main() {
lon := 0.0
package main
import (
"fmt"
"math"
"github.com/wroge/wgs84"
)
type PixelMercator struct {
package main
import (
"fmt"
"math"
"github.com/wroge/wgs84"
)
func main() {