utils

package
v0.0.0-...-c3a31d8 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Number    = "0123456789"
	LowerCase = "abcdefghijklmnopqrstuvwxyz"
	UpperCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Symbol    = "~!@#$%^&*()_+-=/."
)
View Source
const (
	MD5CrackReturnType_Finish = iota
	MD5CrackReturnType_Error
	MD5CrackReturnType_Check
)

Variables

View Source
var MathUtils_NanoToSec float64 = 1 / 1000000000
View Source
var MathUtils_PI float64 = 3.1415927
View Source
var MathUtils_PI2 float64 = MathUtils_PI * 2
View Source
var MathUtils_SIN_BITS uint = 14 // 16KB. Adjust for accuracy.
View Source
var MathUtils_SIN_COUNT int = MathUtils_SIN_MASK + 1
View Source
var MathUtils_SIN_MASK int = ^(1 << MathUtils_SIN_BITS)
View Source
var MathUtils_degFull float64 = 360
View Source
var MathUtils_degreesToRadians float64 = MathUtils_PI / 180
View Source
var MathUtils_radFull float64 = MathUtils_PI * 2
View Source
var MathUtils_radiansToDegrees float64 = 180 / MathUtils_PI

Functions

func CurrentTimeMillis

func CurrentTimeMillis() int64

func MathUtils_Clamp

func MathUtils_Clamp(value, min, max float64) float64

func MathUtils_ToRadians

func MathUtils_ToRadians(angdeg float64) float64

func Printf

func Printf(format string, o ...interface{})

Types

type MD5Crack

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

func NewMD5Crack

func NewMD5Crack(o *MD5CrackOption) *MD5Crack

func (*MD5Crack) Start

func (m *MD5Crack) Start(passwd, k string) chan MD5CrackReturn

type MD5CrackOption

type MD5CrackOption struct {
	GoNum        int
	PasswdLenMin int
	PasswdLenMax int
	CacheChNum   int
}

func NewMD5CrackOption

func NewMD5CrackOption() *MD5CrackOption

type MD5CrackReturn

type MD5CrackReturn struct {
	GoID   int
	Status MD5CrackReturnType
	Recive string
}

type MD5CrackReturnType

type MD5CrackReturnType int

type Tree

type Tree struct {
	Root *TreeNode
	Tag  string
	// contains filtered or unexported fields
}

func NewTree

func NewTree() *Tree

func NewTreeByRootNode

func NewTreeByRootNode(root *TreeNode) *Tree

func NewTreeByRootNodeAndTag

func NewTreeByRootNodeAndTag(root *TreeNode, tag string) *Tree

func NewTreeByTag

func NewTreeByTag(tag string) *Tree

func (*Tree) Add

func (this *Tree) Add(parent, children *TreeNode)

func (*Tree) AllNode

func (this *Tree) AllNode() map[string]*TreeNode

func (*Tree) GetTreeNode

func (this *Tree) GetTreeNode(n string) *TreeNode

func (*Tree) Insert

func (this *Tree) Insert(parent, children *TreeNode, index int) bool

func (*Tree) PathToRoot

func (this *Tree) PathToRoot(node *TreeNode) []*TreeNode

func (*Tree) Remove

func (this *Tree) Remove(parent, node *TreeNode)

func (*Tree) RemoveByIndex

func (this *Tree) RemoveByIndex(parent *TreeNode, index int) (*TreeNode, error)

type TreeNode

type TreeNode struct {
	Data     interface{}
	Children *Array
	// contains filtered or unexported fields
}

func NewTreeData

func NewTreeData() *TreeNode

func NewTreeDataByData

func NewTreeDataByData(data interface{}) *TreeNode

func (*TreeNode) AddChildren

func (this *TreeNode) AddChildren(node *TreeNode)

func (*TreeNode) AddChildrens

func (this *TreeNode) AddChildrens(nodes ...*TreeNode)

func (*TreeNode) Insert

func (this *TreeNode) Insert(index int, node *TreeNode) bool

func (*TreeNode) Parent

func (this *TreeNode) Parent() *TreeNode

func (*TreeNode) Remove

func (this *TreeNode) Remove(node *TreeNode) bool

func (*TreeNode) RemoveByIndex

func (this *TreeNode) RemoveByIndex(index int) (*TreeNode, error)

func (*TreeNode) SetParent

func (this *TreeNode) SetParent(p *TreeNode)

Jump to

Keyboard shortcuts

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