// Initialize bsd implementation of the eventListener interface
776885
func createListener() (eventListener, error) {
	listener := &kqueueListener{}
	kq, err := syscall.Kqueue()
	listener.kq = kq
	return listener, err
}
1364081
func initialize() {
	defaultLogger = &Logger{
		infoLog:    log.New(os.Stderr, initText+tagInfo, flags),
		warningLog: log.New(os.Stderr, initText+tagWarning, flags),
		errorLog:   log.New(os.Stderr, initText+tagError, flags),
		fatalLog:   log.New(os.Stderr, initText+tagFatal, flags),
	}
}
1303192
func (s *BoltStateDB) init() error {
	return s.db.Update(func(tx *boltdd.Tx) error {
		return addMeta(tx.BoltTx())
	})
}
267376
func init() {
	// use all cpus in the system for concurrency
	runtime.GOMAXPROCS(runtime.NumCPU())

	log.SetOutput(os.Stdout)

	flag.Parse()

	if *showUsage {
		flag.Usage()
		os.Exit(0)
	}

	printParams()

	var err error
	Client, err = as.NewClient(*Host, *Port)
	if err != nil {
		PanicOnError(err)
	}
}
1192731
func Initialize(ms MetricSender, mb MetricBatcher) {
	if metricBatcher != nil {
		metricBatcher.Close()
	}
	metricSender = ms
	metricBatcher = mb
}
730812
func (f *Value) Initialize() (interface{}, error) {
	value, err := f.initializer()
	f.set(value, err)
	f.Unlock()

	return value, err
}
709261
func init() {

	docsProvider := func() map[string]interface{} {
		docs := make(map[string]interface{})

		var chromaLexers []interface{}

		sort.Sort(lexers.Registry.Lexers)

		for _, l := range lexers.Registry.Lexers {

			config := l.Config()

			var filenames []string
			filenames = append(filenames, config.Filenames...)
			filenames = append(filenames, config.AliasFilenames...)

			aliases := config.Aliases

			for _, filename := range filenames {
				alias := strings.TrimSpace(strings.TrimPrefix(filepath.Ext(filename), "."))
				if alias != "" {
					aliases = append(aliases, alias)
				}
			}

			sort.Strings(aliases)
			aliases = UniqueStrings(aliases)

			lexerEntry := struct {
				Name    string
				Aliases []string
			}{
				config.Name,
				aliases,
			}

			chromaLexers = append(chromaLexers, lexerEntry)

			docs["lexers"] = chromaLexers
		}
		return docs

	}

	docshelper.AddDocProvider("chroma", docsProvider)
}
1120405
func (ble *BLE) Init() {
	ble.sendCBMsg(1, xpc.Dict{"kCBMsgArgName": fmt.Sprintf("goble-%v", time.Now().Unix()),
		"kCBMsgArgOptions": xpc.Dict{"kCBInitOptionShowPowerAlert": 0}, "kCBMsgArgType": 0})
}
170258
func (document *Document) InitializeForRendering(arguments string) {
	cArguments := C.CString(arguments)
	defer C.free(unsafe.Pointer(cArguments))
	C.initialize_for_rendering(document.handle, cArguments)
}
480355
func (b *BoltStore) initialize() error {
	tx, err := b.conn.Begin(true)
	if err != nil {
		return err
	}
	defer tx.Rollback()

	// Create all the buckets
	if _, err := tx.CreateBucketIfNotExists(dbLogs); err != nil {
		return err
	}
	if _, err := tx.CreateBucketIfNotExists(dbConf); err != nil {
		return err
	}

	return tx.Commit()
}
943341
func (l *MutexD) Init() {
	if !l.initialized {
		l.locks = make(map[string]int64)
		l.signals = make(chan *lockSignal, 1000)
		go l.listner()
		l.initialized = true
	}
}
569983
func init() {
	// We'll use zero width joiners.
	runewidth.ZeroWidthJoiner = true

	// Initialize the predefined input field handlers.
	InputFieldInteger = func(text string, ch rune) bool {
		if text == "-" {
			return true
		}
		_, err := strconv.Atoi(text)
		return err == nil
	}
	InputFieldFloat = func(text string, ch rune) bool {
		if text == "-" || text == "." || text == "-." {
			return true
		}
		_, err := strconv.ParseFloat(text, 64)
		return err == nil
	}
	InputFieldMaxLength = func(maxLength int) func(text string, ch rune) bool {
		return func(text string, ch rune) bool {
			return len([]rune(text)) <= maxLength
		}
	}
}
412802
func (r *Rx) Init(tx, rx []byte, sharedEventFDState *uint32) {
	r.sharedEventFDState = sharedEventFDState
	r.tx.Init(tx)
	r.rx.Init(rx)
}
351234
func (session *Session) Init() {
	session.statement.Init()
	session.statement.Engine = session.engine
	session.isAutoCommit = true
	session.isCommitedOrRollbacked = false
	session.isAutoClose = false
	session.autoResetStatement = true
	session.prepareStmt = false

	// !nashtsai! is lazy init better?
	session.afterInsertBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterUpdateBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.afterDeleteBeans = make(map[interface{}]*[]func(interface{}), 0)
	session.beforeClosures = make([]func(interface{}), 0)
	session.afterClosures = make([]func(interface{}), 0)
	session.stmtCache = make(map[uint32]*core.Stmt)

	session.afterProcessors = make([]executedProcessor, 0)

	session.lastSQL = ""
	session.lastSQLArgs = []interface{}{}

	session.ctx = session.engine.defaultContext
}
922809
func (p *BoltExample) Init() (err error) {
	db := p.DB.NewBroker(keyval.Root)

	// Store some data
	txn := db.NewTxn()
	txn.Put("/agent/config/interface/iface0", nil)
	txn.Put("/agent/config/interface/iface1", nil)
	txn.Commit(context.Background())

	// List keys
	const listPrefix = "/agent/config/interface/"

	p.Log.Infof("List BoltDB keys: %s", listPrefix)

	keys, err := db.ListKeys(listPrefix)
	if err != nil {
		p.Log.Fatal(err)
	}

	for {
		key, val, all := keys.GetNext()
		if all == true {
			break
		}

		p.Log.Infof("Key: %q Val: %v", key, val)
	}

	return nil
}
900161
func (b *BigtableIdx) Init() error {
	log.Infof("bigtable-idx: Initializing. Project=%s, Instance=%s", b.cfg.GcpProject, b.cfg.BigtableInstance)
	if err := b.MemoryIndex.Init(); err != nil {
		return err
	}

	if err := b.InitBare(); err != nil {
		return err
	}

	if b.cfg.UpdateBigtableIdx {
		b.wg.Add(b.cfg.WriteConcurrency)
		for i := 0; i < b.cfg.WriteConcurrency; i++ {
			go b.processWriteQueue()
		}
		log.Infof("bigtable-idx: started %d writeQueue handlers", b.cfg.WriteConcurrency)
	}

	b.rebuildIndex()
	if memory.IndexRules.Prunable() {
		b.wg.Add(1)
		go b.prune()
	}
	return nil
}
1270761
func (p *Plugin) Init() error {
	p.Adapter = &syncbase.Adapter{
		Watcher: NewAdapter(p.GRPC.GetServer()),
	}
	return nil
}