- Using linked list
- Using array
Array-based implementation:
- allocate array of the max size.
# Current Flows | |
## SOAP | |
Soap generates: | |
- replacements | |
- resends |
package main | |
import ( | |
"database/sql" | |
"log" | |
"sync" | |
"github.com/jmoiron/sqlx" | |
_ "github.com/lib/pq" | |
) |
# A single round-robin schedule: | |
# 1. match the members: (group1[i], group2[i]) | |
# 2. rotate all the member except the first one | |
# continue the process. | |
from typing import List, Tuple | |
from dataclasses import dataclass | |
import datetime | |
package main | |
import ( | |
"fmt" | |
"html/template" | |
"log" | |
"net/http" | |
"os" | |
"github.com/gorilla/pat" |
type request struct { | |
Field1, Field2 int | |
} | |
r := request{Field1: 1, Field2: 2} | |
data := `{"Field2": 202}` | |
err := json.Unmarshal([]byte(data), &r) | |
if err != nil { | |
panic(err) |
s := map[string]int{ | |
"Field1": 1, | |
"Field2": 2, | |
} | |
data := `{"Field2": 202}` | |
err := json.Unmarshal([]byte(data), &s) | |
if err != nil { | |
panic(err) |
type Struct1 struct { | |
A int | |
B int | |
} | |
type Struct2 struct { | |
A int | |
} | |
func main() { |
type Struct1 struct { | |
A int `db:"a"` | |
} | |
type Struct2 struct { | |
A int `json:"a"` | |
} | |
func main() { | |
s1 := Struct1{A: 1} |