funcs

package
v0.0.0-...-028e29d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BFS

func BFS(f func(item string) []string, worklist []string)

BFS is breadth First serach for each item in worklist f is called at most once for each item

func Comma1

func Comma1(s string) string

Comma1 inserts commas in a non-negative decimal integer string.

func Comma2

func Comma2(s string) string

Comma2 inserts commas in a non-negative decimal integer string.

func CompareByte

func CompareByte(s1, s2 string) bool

CompareByte is a func

func CountFilesLines

func CountFilesLines(files []string)

CountFilesLines will count all files same line

func Fetch

func Fetch(url string) bool

Fetch will fetch url and print to stdout

func Fetch2

func Fetch2(url string) (filename string, n int64, err error)

Fetch2 output result to file

func FetchAll

func FetchAll(urls []string)

FetchAll will fetch all url and show time

func Fibonacci

func Fibonacci() func() int

Fibonacci is a func

func Is64

func Is64() bool

Is64 returns true if this machince is 64 bit

func Lissajous1

func Lissajous1(out io.Writer)

Lissajous1 is a gif func

func Lissajous2

func Lissajous2(out io.Writer, cycles float64)

Lissajous2 is a gif func

func PopCount0

func PopCount0(x uint64) int

PopCount0 returns the population count (number of set bits) of x.

func PopCount1

func PopCount1(x uint64) int

PopCount1 returns the population count (number of set bits) of x.

func PopCount2

func PopCount2(x uint64) int

PopCount2 returns the population count (number of set bits) of x.

func PopCount3

func PopCount3(x uint64) int

PopCount3 returns the population count (number of set bits) of x.

func Recover

func Recover() (err error)

Recover is test func, will return non-nil but not use `return`

func RemoveSame

func RemoveSame(s []string) []string

RemoveSame ia a func

func Reverse

func Reverse(s []int)

Reverse reverses a slice of ints in place.

func Rotate

func Rotate(s []int, r int) []int

Rotate is rotate to left

func SHACount

func SHACount(x1, x2 *[32]byte) int

SHACount is a func

func Topo

func Topo()

Topo is func

func Trace

func Trace(msg string) func()

Trace will record func time cost, need ues by defer

func Wordfreq

func Wordfreq(filename string)

Wordfreq will count all word freq

Types

type LineInfo

type LineInfo struct {
	// contains filtered or unexported fields
}

LineInfo is a struct for record text line info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL