Skip to content

Instantly share code, notes, and snippets.

View kidinamoto01's full-sized avatar

suyuhuang kidinamoto01

  • bianjie.ai
  • shanghai,china
View GitHub Profile
╔══════╦══════╦════════╗
║ Col1 ║ Col2 ║ NumCol ║
╠══════╬══════╬════════╣
║ MMM ║ MMM ║ MMM ║
║ 111 ║ 111 ║ 111 ║
║ AAA ║ AAA ║ AAA ║
╚══════╩══════╩════════╝
package main
import ("fmt")
type IPAddr [4]byte
// TODO: Add a "String() string" method to IPAddr.
func (ip IPAddr ) String() string{
return fmt.Sprintf("%v.%v.%v.%v", ip[0], ip[1],ip[2],ip[3])
}
package main
import (
"fmt"
"math"
)
type ErrNegativeSqrt float64
func (e ErrNegativeSqrt) Error() string {
package main
import "code.google.com/p/go-tour/reader"
type MyReader struct{}
func (r MyReader) Read(bytes []byte) (int, error) {
for i := range bytes {
bytes[i] = 65
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
package main
import (
"log"
"net/http"
)
type String string
type Struct struct {
package main
import (
"code.google.com/p/go-tour/pic"
"image"
"image/color"
)
type Image struct {
w, h int
pragma solidity ^0.4.8;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/issues/20
contract ERC20Interface {
// Get the total token supply
SELECT
tc.constraint_name, tc.table_name, kcu.column_name,
ccu.table_name AS foreign_table_name,
ccu.column_name AS foreign_column_name
FROM
information_schema.table_constraints AS tc
JOIN information_schema.key_column_usage AS kcu
ON tc.constraint_name = kcu.constraint_name
JOIN information_schema.constraint_column_usage AS ccu
ON ccu.constraint_name = tc.constraint_name
package main
import (
"fmt"
"log"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)