Skip to content

Instantly share code, notes, and snippets.

//our table's data
const tableData = {
1 : ["Simon ugorji", "[email protected]", "01234", "Germany"],
2 : ["Tony ugorji", "[email protected]", "013234", "Turkey"],
3 : ["Victor ugorji", "[email protected]", "014234", "Germany"],
4 : ["Felix ugorji", "[email protected]", "011234", "Canada"],
5 : ["Jordan ugorji", "[email protected]", "016234", "Costa Rica"],
6 : ["Henry ugorji", "[email protected]", "0166234", "Belgium"],
7 : ["Frank Sams", "[email protected]", "01234", "Nigeria"],
8 : ["John Doe", "[email protected]", "0123466", "Australia"],
package main
import (
"database/sql"
"gopkg.in/gorp.v1"
"log"
"strconv"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
@smallnest
smallnest / demo.go
Created September 29, 2015 05:55
go语言语法演示
/*
GoTips.go:
Golang速学速查速用代码手册
Source: github.com/coderzh/CodeTips/blob/master/GoTips.go
Author: coderzh(github.com/coderzh)
Blog: http://blog.coderzh.com
参考:《Go语言编程》
*/
@joshrotenberg
joshrotenberg / embedded.go
Last active June 17, 2025 01:42
embedded nsqd
package main
// This is a basic example of running an nsqd instance embedded. It creates
// and runs an nsqd with all of the default options, and then produces
// and consumes a single message. You are probably better off running a
// standalone instance, but embedding it can simplify deployment and is
// useful in testing.
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for
@cryptix
cryptix / vineScrape.go
Created August 27, 2014 12:31
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@pinscript
pinscript / home.html
Last active September 23, 2017 01:18
{{define "body"}}
This is the start page.
<br><br>
Check out <a href="/user/5">user 5</a> or <a href="/user/7">user 7</a>.
{{end}}
@baishuai
baishuai / NA数值分析实验.md
Last active June 14, 2016 23:19
数值分析实验2014年 蔡懿慈

2014年数值分析(蔡懿慈) 实验题解

运行实验代码需要安装go
安装方法

  • ubuntu sudo apt-get install golang
  • archlinux sudo pacman -S go
  • osx brew install go
  • windows 下载二进制文件安装

每个实验独立一个go文件,相互之间没有依赖

{
"snippets": [
{
"match": {"global": true, "pkgname": ".", "fn": ".*_test.go"},
"snippets": [
{"text": "func Test", "title": "", "value": "func Test${1:ObjectName}${2:TestName}(t *testing.T) {\n\t$0\n}"},
{"text": "func Benchmark", "title": "", "value": "func Benchmark${1:ObjectName}${2:BenchmarkName}(b *testing.B) {\n\n\tb.StopTimer()\n\n\t$0\n\n\tb.StartTimer()\n\n\tfor i := 0; i < b.N; i++ {\n\t\t\n\t}\n\n}"},
{"text": "func Example", "title": "", "value": "func Example${1:ObjectName}${2:ExampleName}() {\n\n\t$0\n\n\t// Output:\n\t// \n\n}"}
]
}
@freeeve
freeeve / output.txt
Last active April 23, 2019 07:37
database/sql/rows to json...
eve-macbook:~ go run rowstojson.go
[
{
"id": 0,
"name": "Peck Duran",
"street": "Chapel Street",
"city": "Orbin",
"zip": "94999",
"state": "Maine",
"email": "[email protected]",