//newTodo creates a new todo list item for a given string.  Note that the
//three primary elements are Attributes so the constraint system can operate
//on them.  The value provided is used to initialize the displayed text.
546608
func newTodo(raw string) *todo {
	result := &todo{
		name:    s5.NewStringSimple(raw),
		done:    s5.NewBooleanSimple(false),
		editing: s5.NewBooleanSimple(false),
	}
	result.modName = s5.NewModelName(result)
	return result
}
666660
func (n *Tokenize) NewToken(start, end int) *Token {
  return &Token { n, start, end }
}
408356
func NewTable(table string) *Table {
	tpb := TablePb{
		Name:         strings.ToLower(table),
		NameOriginal: table,
	}
	t := &Table{
		TablePb:  tpb,
		Fields:   make([]*Field, 0),
		FieldMap: make(map[string]*Field),
	}
	t.init(nil)
	return t
}
647314
func NewTuple(values ...interface{}) *Tuple {
	t := &Tuple{}

	for _, v := range values {
		t.Values = append(t.Values, v)
	}
	return t
}
754941
func NewTable(rowColors []*color.Color, alignRight []bool, indentWidth int) *Table {
	return &Table{rowColors, alignRight, indentWidth}
}
826296
func NewTodoListAPI(spec *loads.Document) *TodoListAPI {
	return &TodoListAPI{
		handlers:            make(map[string]map[string]http.Handler),
		formats:             strfmt.Default,
		defaultConsumes:     "application/json",
		defaultProduces:     "application/json",
		customConsumers:     make(map[string]runtime.Consumer),
		customProducers:     make(map[string]runtime.Producer),
		ServerShutdown:      func() {},
		spec:                spec,
		ServeError:          errors.ServeError,
		BasicAuthenticator:  security.BasicAuth,
		APIKeyAuthenticator: security.APIKeyAuth,
		BearerAuthenticator: security.BearerAuth,
		JSONConsumer:        runtime.JSONConsumer(),
		JSONProducer:        runtime.JSONProducer(),
		TodosAddOneHandler: todos.AddOneHandlerFunc(func(params todos.AddOneParams, principal interface{}) middleware.Responder {
			return middleware.NotImplemented("operation TodosAddOne has not yet been implemented")
		}),
		TodosDestroyOneHandler: todos.DestroyOneHandlerFunc(func(params todos.DestroyOneParams, principal interface{}) middleware.Responder {
			return middleware.NotImplemented("operation TodosDestroyOne has not yet been implemented")
		}),
		TodosFindHandler: todos.FindHandlerFunc(func(params todos.FindParams, principal interface{}) middleware.Responder {
			return middleware.NotImplemented("operation TodosFind has not yet been implemented")
		}),
		TodosUpdateOneHandler: todos.UpdateOneHandlerFunc(func(params todos.UpdateOneParams, principal interface{}) middleware.Responder {
			return middleware.NotImplemented("operation TodosUpdateOne has not yet been implemented")
		}),

		// Applies when the "x-todolist-token" header is set
		KeyAuth: func(token string) (interface{}, error) {
			return nil, errors.NotImplemented("api key auth (key) x-todolist-token from header param [x-todolist-token] has not yet been implemented")
		},

		// default authorizer is authorized meaning no requests are blocked
		APIAuthorizer: security.Authorized(),
	}
}
1364248
func NewTableOption(k, v string, q bool) TableOption {
	return &tableopt{
		key:        k,
		value:      v,
		needQuotes: q,
	}
}
1052765
func NewTextInput(name, label, text string) *TextInputElement {
	return &TextInputElement{
		DialogInput: DialogInput{
			Type:  InputTypeText,
			Name:  name,
			Label: label,
		},
		Value: text,
	}
}
343343
@MemberOrder(sequence = "40")
    public FullCalendar2WicketToDoItem newToDo(
            @ParameterLayout(named = "Description")
            @Parameter(regexPattern = "\\w[@&:\\-\\,\\.\\+ \\w]*")
            final String description) {
        final String ownedBy = currentUserName();
        return newToDo(description, ownedBy);
    }
1283687
func newTimSorter(arr sort.Interface, maxTempSlots int) *TimSorter {
	return &TimSorter{
		Sorter:       newSorter(arr),
		runEnds:      make([]int, 1+STACKSIZE),
		maxTempSlots: maxTempSlots,
	}
}
1247327
func IntsDo(op Op, s []int, t ...int) []int {
	data := sort.IntSlice(append(s, t...))
	n := op(data, len(s))
	return data[:n]
}
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
}
391535
func NewTferAction(s string) (tferAction, error) {
	var e tferAction
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
452129
func (app *App) GoTo(formName string, params []string) error {
	log.Println("App goto", formName)
	form, present := app.Forms[formName]
	if present {
		app.CurrentForm = form.Initialize(app.WS)
		err := form.Render(app.WS, app, params)
		if err != nil {
			log.Println("Error on goto", err)
		}
		status.Status.Gotos++
		action.UnblockUI(app.WS)
	} else {
		log.Println("[ERROR] Form not registred", formName)
	}
	return nil
}
476797
func NewDo(Stmt node.Node, Cond node.Node) *Do {
	return &Do{
		FreeFloating: nil,
		Stmt:         Stmt,
		Cond:         Cond,
	}
}
530133
func NewTodoListAPI(spec *loads.Document) *TodoListAPI {
	return &TodoListAPI{
		handlers:            make(map[string]map[string]http.Handler),
		formats:             strfmt.Default,
		defaultConsumes:     "application/json",
		defaultProduces:     "application/json",
		customConsumers:     make(map[string]runtime.Consumer),
		customProducers:     make(map[string]runtime.Producer),
		ServerShutdown:      func() {},
		spec:                spec,
		ServeError:          errors.ServeError,
		BasicAuthenticator:  security.BasicAuth,
		APIKeyAuthenticator: security.APIKeyAuth,
		BearerAuthenticator: security.BearerAuth,
		JSONConsumer:        runtime.JSONConsumer(),
		JSONProducer:        runtime.JSONProducer(),
		TodosFindTodosHandler: todos.FindTodosHandlerFunc(func(params todos.FindTodosParams) middleware.Responder {
			return middleware.NotImplemented("operation TodosFindTodos has not yet been implemented")
		}),
	}
}
1324711
func parseDo(t *Tree, start Pos) (Node, error) {
	expr, err := t.parseExpr()
	if err != nil {
		return nil, err
	}
	_, err = t.expect(tokenTagClose)
	if err != nil {
		return nil, err
	}
	return NewDoNode(expr, start), nil
}