// newPrettyTable - creates a new pretty table
549723
func newPrettyTable(separator string, cols ...Field) PrettyTable {
	return PrettyTable{
		cols:      cols,
		separator: separator,
	}
}
447244
func (L *State) CreateTable(narr int, nrec int) {
	C.lua_createtable(L.s, C.int(narr), C.int(nrec))
}
97380
func NewJsonHandlerTables(lh datasource.FileLineHandler, tables []string) FileHandler {
	return &jsonHandlerTables{
		FileHandler: &jsonHandler{lh},
		tables:      tables,
	}
}
1283215
func (cb *CreateBuilder) Table(name string) *CreateTableBuilder {
	return &CreateTableBuilder{
		name:    name,
		columns: make([]tableColumn, 0),
	}
}
763523
func (tx *Tx) CreateTable(model interface{}, opt *orm.CreateTableOptions) error {
	return orm.CreateTable(tx, model, opt)
}
130484
func (s *TemplateService) NewPrepareTemplateParams(templateid string, zoneid string) *PrepareTemplateParams {
	p := &PrepareTemplateParams{}
	p.p = make(map[string]interface{})
	p.p["templateid"] = templateid
	p.p["zoneid"] = zoneid
	return p
}
622956
func New(name string) *htmlTemplate.Template {
	return htmlTemplate.New(name).Funcs(GtfFuncMap)
}
751794
func New(columnHeaders ...interface{}) Table {
	t := table{header: make([]string, len(columnHeaders))}

	t.WithPadding(DefaultPadding)
	t.WithWriter(DefaultWriter)
	t.WithHeaderFormatter(DefaultHeaderFormatter)
	t.WithFirstColumnFormatter(DefaultFirstColumnFormatter)
	t.WithWidthFunc(DefaultWidthFunc)

	for i, col := range columnHeaders {
		t.header[i] = fmt.Sprint(col)
	}

	return &t
}
1207155
func New(bs []string) (*Table, error) {
	m := make(map[string]bool)
	for _, b := range bs {
		m[b] = true
	}
	if len(m) != len(bs) {
		return nil, fmt.Errorf("table.New does not allow duplicated bindings in %s", bs)
	}
	return &Table{
		AvailableBindings: bs,
		mbs:               m,
	}, nil
}
1333242
func NewFormat(source string, quiet bool) formatter.Format {
	switch source {
	case formatter.PrettyFormatKey:
		return configInspectPrettyTemplate
	case formatter.TableFormatKey:
		if quiet {
			return formatter.DefaultQuietFormat
		}
		return defaultConfigTableFormat
	}
	return formatter.Format(source)
}
1090509
func CreateTable(c *gocql.ClusterConfig, t CTable) error {
	qs := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %v ( %v ) %v ;", t.Name, strings.Join(t.Columns, ", "), t.Options)
	s, err := c.CreateSession()
	if err != nil {
		return err
	}
	defer s.Close()
	log.Printf("Creating table %v\n", t.Name)
	return s.Query(qs).Exec()
}
795371
func (s *HostService) NewPrepareHostForMaintenanceParams(id string) *PrepareHostForMaintenanceParams {
	p := &PrepareHostForMaintenanceParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
1002598
func NewTable(headers []string) *Table {
	pt := &Table{
		headers:     headers,
		columnWidth: make([]int, len(headers)),
		colSpacing:  "   ",
		transformer: make([]Transformer, len(headers)),
	}
	// Standard colorization, column 0 is auto-highlighted as some
	// name. Everything else has no transformation (== identity
	// transform)
	for i := range pt.transformer {
		pt.transformer[i] = nop
	}
	if 0 < len(headers) {
		pt.transformer[0] = TableContentHeaderColor
	}
	return pt
}
1155790
func New(headers []string, data interface{}) (*SimpleTable, error) {
	table := SimpleTable{
		headers:      headers,
		rows:         [][]string{},
		columnWidths: nil,
	}

	dv := reflect.ValueOf(data)
	for n := 0; n < dv.Len(); n++ {
		item := dv.Index(n)
		row := []string{}
		t := item.Type()
		if t.Kind() == reflect.Slice {
			row = convertSlice(item)
		} else if t.Kind() == reflect.Struct {
			row = convertStruct(item)
		} else {
			return nil, errTypeNotConvertible
		}

		if table.columnWidths == nil {
			table.columnWidths = make([]int, len(row))
			for i, column := range headers {
				if len(column) > table.columnWidths[i] {
					table.columnWidths[i] = len(column)
				}
			}
		}
		for i, column := range row {
			if len(column) > table.columnWidths[i] {
				table.columnWidths[i] = len(column)
			}
		}
		table.rows = append(table.rows, row)
	}

	return &table, nil
}
1271793
func newDbTables(mi *modelInfo, base dbBaser) *dbTables {
	tables := &dbTables{}
	tables.tablesM = make(map[string]*dbTable)
	tables.mi = mi
	tables.base = base
	return tables
}
696224
func newStringTables() *stringTables {
	return &stringTables{
		Tables:    make(map[int32]*stringTable),
		NameIndex: make(map[string]int32),
		nextIndex: 0,
	}
}
550747
func CreateTable() *Table {
	t := &Table{elements: []Element{}, Style: DefaultStyle}
	if outputsEnabled.UTF8 {
		t.Style.setUtfBoxStyle()
	}
	if outputsEnabled.titleStyle != titleStyle(0) {
		t.Style.htmlRules.title = outputsEnabled.titleStyle
	}
	t.outputMode = defaultOutputMode
	return t
}