text:
package postgres

import (
	"bytes"
	"context"
	"reflect"
	"testing"

	"github.com/thrasher-corp/sqlboiler/boil"
	"github.com/thrasher-corp/sqlboiler/queries"
	"github.com/thrasher-corp/sqlboiler/randomize"
	"github.com/thrasher-corp/sqlboiler/strmangle"
)

var (
	// Relationships sometimes use the reflection helper queries.Equal/queries.Assign
	// so force a package dependency in case they don't.
	_ = queries.Equal
)

func testWithdrawalFiats(t *testing.T) {
	t.Parallel()

	query := WithdrawalFiats()

	if query.Query == nil {
		t.Error("expected a query, got nothing")
	}
}

func testWithdrawalFiatsDelete(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	if rowsAff, err := o.Delete(ctx, tx); err != nil {
		t.Error(err)
	} else if rowsAff != 1 {
		t.Error("should only have deleted one row, but affected:", rowsAff)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 0 {
		t.Error("want zero records, got:", count)
	}
}

func testWithdrawalFiatsQueryDeleteAll(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	if rowsAff, err := WithdrawalFiats().DeleteAll(ctx, tx); err != nil {
		t.Error(err)
	} else if rowsAff != 1 {
		t.Error("should only have deleted one row, but affected:", rowsAff)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 0 {
		t.Error("want zero records, got:", count)
	}
}

func testWithdrawalFiatsSliceDeleteAll(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	slice := WithdrawalFiatSlice{o}

	if rowsAff, err := slice.DeleteAll(ctx, tx); err != nil {
		t.Error(err)
	} else if rowsAff != 1 {
		t.Error("should only have deleted one row, but affected:", rowsAff)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 0 {
		t.Error("want zero records, got:", count)
	}
}

func testWithdrawalFiatsExists(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	e, err := WithdrawalFiatExists(ctx, tx, o.ID)
	if err != nil {
		t.Errorf("Unable to check if WithdrawalFiat exists: %s", err)
	}
	if !e {
		t.Errorf("Expected WithdrawalFiatExists to return true, but got false.")
	}
}

func testWithdrawalFiatsFind(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	withdrawalFiatFound, err := FindWithdrawalFiat(ctx, tx, o.ID)
	if err != nil {
		t.Error(err)
	}

	if withdrawalFiatFound == nil {
		t.Error("want a record, got nil")
	}
}

func testWithdrawalFiatsBind(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	if err = WithdrawalFiats().Bind(ctx, tx, o); err != nil {
		t.Error(err)
	}
}

func testWithdrawalFiatsOne(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	if x, err := WithdrawalFiats().One(ctx, tx); err != nil {
		t.Error(err)
	} else if x == nil {
		t.Error("expected to get a non nil record")
	}
}

func testWithdrawalFiatsAll(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	withdrawalFiatOne := &WithdrawalFiat{}
	withdrawalFiatTwo := &WithdrawalFiat{}
	if err = randomize.Struct(seed, withdrawalFiatOne, withdrawalFiatDBTypes, false, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}
	if err = randomize.Struct(seed, withdrawalFiatTwo, withdrawalFiatDBTypes, false, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = withdrawalFiatOne.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}
	if err = withdrawalFiatTwo.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	slice, err := WithdrawalFiats().All(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if len(slice) != 2 {
		t.Error("want 2 records, got:", len(slice))
	}
}

func testWithdrawalFiatsCount(t *testing.T) {
	t.Parallel()

	var err error
	seed := randomize.NewSeed()
	withdrawalFiatOne := &WithdrawalFiat{}
	withdrawalFiatTwo := &WithdrawalFiat{}
	if err = randomize.Struct(seed, withdrawalFiatOne, withdrawalFiatDBTypes, false, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}
	if err = randomize.Struct(seed, withdrawalFiatTwo, withdrawalFiatDBTypes, false, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = withdrawalFiatOne.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}
	if err = withdrawalFiatTwo.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 2 {
		t.Error("want 2 records, got:", count)
	}
}

func withdrawalFiatBeforeInsertHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatAfterInsertHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatAfterSelectHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatBeforeUpdateHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatAfterUpdateHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatBeforeDeleteHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatAfterDeleteHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatBeforeUpsertHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func withdrawalFiatAfterUpsertHook(ctx context.Context, e boil.ContextExecutor, o *WithdrawalFiat) error {
	*o = WithdrawalFiat{}
	return nil
}

func testWithdrawalFiatsHooks(t *testing.T) {
	t.Parallel()

	var err error

	ctx := context.Background()
	empty := &WithdrawalFiat{}
	o := &WithdrawalFiat{}

	seed := randomize.NewSeed()
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, false); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat object: %s", err)
	}

	AddWithdrawalFiatHook(boil.BeforeInsertHook, withdrawalFiatBeforeInsertHook)
	if err = o.doBeforeInsertHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doBeforeInsertHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected BeforeInsertHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatBeforeInsertHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.AfterInsertHook, withdrawalFiatAfterInsertHook)
	if err = o.doAfterInsertHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doAfterInsertHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected AfterInsertHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatAfterInsertHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.AfterSelectHook, withdrawalFiatAfterSelectHook)
	if err = o.doAfterSelectHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doAfterSelectHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected AfterSelectHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatAfterSelectHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.BeforeUpdateHook, withdrawalFiatBeforeUpdateHook)
	if err = o.doBeforeUpdateHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doBeforeUpdateHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected BeforeUpdateHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatBeforeUpdateHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.AfterUpdateHook, withdrawalFiatAfterUpdateHook)
	if err = o.doAfterUpdateHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doAfterUpdateHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected AfterUpdateHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatAfterUpdateHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.BeforeDeleteHook, withdrawalFiatBeforeDeleteHook)
	if err = o.doBeforeDeleteHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doBeforeDeleteHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected BeforeDeleteHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatBeforeDeleteHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.AfterDeleteHook, withdrawalFiatAfterDeleteHook)
	if err = o.doAfterDeleteHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doAfterDeleteHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected AfterDeleteHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatAfterDeleteHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.BeforeUpsertHook, withdrawalFiatBeforeUpsertHook)
	if err = o.doBeforeUpsertHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doBeforeUpsertHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected BeforeUpsertHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatBeforeUpsertHooks = []WithdrawalFiatHook{}

	AddWithdrawalFiatHook(boil.AfterUpsertHook, withdrawalFiatAfterUpsertHook)
	if err = o.doAfterUpsertHooks(ctx, nil); err != nil {
		t.Errorf("Unable to execute doAfterUpsertHooks: %s", err)
	}
	if !reflect.DeepEqual(o, empty) {
		t.Errorf("Expected AfterUpsertHook function to empty object, but got: %#v", o)
	}
	withdrawalFiatAfterUpsertHooks = []WithdrawalFiatHook{}
}

func testWithdrawalFiatsInsert(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 1 {
		t.Error("want one record, got:", count)
	}
}

func testWithdrawalFiatsInsertWhitelist(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Whitelist(withdrawalFiatColumnsWithoutDefault...)); err != nil {
		t.Error(err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 1 {
		t.Error("want one record, got:", count)
	}
}

func testWithdrawalFiatToOneWithdrawalHistoryUsingWithdrawalFiat(t *testing.T) {
	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()

	var local WithdrawalFiat
	var foreign WithdrawalHistory

	seed := randomize.NewSeed()
	if err := randomize.Struct(seed, &local, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}
	if err := randomize.Struct(seed, &foreign, withdrawalHistoryDBTypes, false, withdrawalHistoryColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalHistory struct: %s", err)
	}

	if err := foreign.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Fatal(err)
	}

	queries.Assign(&local.WithdrawalFiatID, foreign.ID)
	if err := local.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Fatal(err)
	}

	check, err := local.WithdrawalFiat().One(ctx, tx)
	if err != nil {
		t.Fatal(err)
	}

	if !queries.Equal(check.ID, foreign.ID) {
		t.Errorf("want: %v, got %v", foreign.ID, check.ID)
	}

	slice := WithdrawalFiatSlice{&local}
	if err = local.L.LoadWithdrawalFiat(ctx, tx, false, (*[]*WithdrawalFiat)(&slice), nil); err != nil {
		t.Fatal(err)
	}
	if local.R.WithdrawalFiat == nil {
		t.Error("struct should have been eager loaded")
	}

	local.R.WithdrawalFiat = nil
	if err = local.L.LoadWithdrawalFiat(ctx, tx, true, &local, nil); err != nil {
		t.Fatal(err)
	}
	if local.R.WithdrawalFiat == nil {
		t.Error("struct should have been eager loaded")
	}
}

func testWithdrawalFiatToOneSetOpWithdrawalHistoryUsingWithdrawalFiat(t *testing.T) {
	var err error

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()

	var a WithdrawalFiat
	var b, c WithdrawalHistory

	seed := randomize.NewSeed()
	if err = randomize.Struct(seed, &a, withdrawalFiatDBTypes, false, strmangle.SetComplement(withdrawalFiatPrimaryKeyColumns, withdrawalFiatColumnsWithoutDefault)...); err != nil {
		t.Fatal(err)
	}
	if err = randomize.Struct(seed, &b, withdrawalHistoryDBTypes, false, strmangle.SetComplement(withdrawalHistoryPrimaryKeyColumns, withdrawalHistoryColumnsWithoutDefault)...); err != nil {
		t.Fatal(err)
	}
	if err = randomize.Struct(seed, &c, withdrawalHistoryDBTypes, false, strmangle.SetComplement(withdrawalHistoryPrimaryKeyColumns, withdrawalHistoryColumnsWithoutDefault)...); err != nil {
		t.Fatal(err)
	}

	if err := a.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Fatal(err)
	}
	if err = b.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Fatal(err)
	}

	for i, x := range []*WithdrawalHistory{&b, &c} {
		err = a.SetWithdrawalFiat(ctx, tx, i != 0, x)
		if err != nil {
			t.Fatal(err)
		}

		if a.R.WithdrawalFiat != x {
			t.Error("relationship struct not set to correct value")
		}

		if x.R.WithdrawalFiatWithdrawalFiats[0] != &a {
			t.Error("failed to append to foreign relationship struct")
		}
		if !queries.Equal(a.WithdrawalFiatID, x.ID) {
			t.Error("foreign key was wrong value", a.WithdrawalFiatID)
		}

		zero := reflect.Zero(reflect.TypeOf(a.WithdrawalFiatID))
		reflect.Indirect(reflect.ValueOf(&a.WithdrawalFiatID)).Set(zero)

		if err = a.Reload(ctx, tx); err != nil {
			t.Fatal("failed to reload", err)
		}

		if !queries.Equal(a.WithdrawalFiatID, x.ID) {
			t.Error("foreign key was wrong value", a.WithdrawalFiatID, x.ID)
		}
	}
}

func testWithdrawalFiatToOneRemoveOpWithdrawalHistoryUsingWithdrawalFiat(t *testing.T) {
	var err error

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()

	var a WithdrawalFiat
	var b WithdrawalHistory

	seed := randomize.NewSeed()
	if err = randomize.Struct(seed, &a, withdrawalFiatDBTypes, false, strmangle.SetComplement(withdrawalFiatPrimaryKeyColumns, withdrawalFiatColumnsWithoutDefault)...); err != nil {
		t.Fatal(err)
	}
	if err = randomize.Struct(seed, &b, withdrawalHistoryDBTypes, false, strmangle.SetComplement(withdrawalHistoryPrimaryKeyColumns, withdrawalHistoryColumnsWithoutDefault)...); err != nil {
		t.Fatal(err)
	}

	if err = a.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Fatal(err)
	}

	if err = a.SetWithdrawalFiat(ctx, tx, true, &b); err != nil {
		t.Fatal(err)
	}

	if err = a.RemoveWithdrawalFiat(ctx, tx, &b); err != nil {
		t.Error("failed to remove relationship")
	}

	count, err := a.WithdrawalFiat().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}
	if count != 0 {
		t.Error("want no relationships remaining")
	}

	if a.R.WithdrawalFiat != nil {
		t.Error("R struct entry should be nil")
	}

	if !queries.IsValuerNil(a.WithdrawalFiatID) {
		t.Error("foreign key value should be nil")
	}

	if len(b.R.WithdrawalFiatWithdrawalFiats) != 0 {
		t.Error("failed to remove a from b's relationships")
	}
}

func testWithdrawalFiatsReload(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	if err = o.Reload(ctx, tx); err != nil {
		t.Error(err)
	}
}

func testWithdrawalFiatsReloadAll(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	slice := WithdrawalFiatSlice{o}

	if err = slice.ReloadAll(ctx, tx); err != nil {
		t.Error(err)
	}
}

func testWithdrawalFiatsSelect(t *testing.T) {
	t.Parallel()

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	slice, err := WithdrawalFiats().All(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if len(slice) != 1 {
		t.Error("want one record, got:", len(slice))
	}
}

var (
	withdrawalFiatDBTypes = map[string]string{`ID`: `bigint`, `WithdrawalFiatID`: `uuid`, `BankName`: `text`, `BankAddress`: `text`, `BankAccountName`: `text`, `BankAccountNumber`: `text`, `BSB`: `text`, `SwiftCode`: `text`, `Iban`: `text`, `BankCode`: `double precision`}
	_                     = bytes.MinRead
)

func testWithdrawalFiatsUpdate(t *testing.T) {
	t.Parallel()

	if 0 == len(withdrawalFiatPrimaryKeyColumns) {
		t.Skip("Skipping table with no primary key columns")
	}
	if len(withdrawalFiatAllColumns) == len(withdrawalFiatPrimaryKeyColumns) {
		t.Skip("Skipping table with only primary key columns")
	}

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 1 {
		t.Error("want one record, got:", count)
	}

	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatPrimaryKeyColumns...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	if rowsAff, err := o.Update(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	} else if rowsAff != 1 {
		t.Error("should only affect one row but affected", rowsAff)
	}
}

func testWithdrawalFiatsSliceUpdateAll(t *testing.T) {
	t.Parallel()

	if len(withdrawalFiatAllColumns) == len(withdrawalFiatPrimaryKeyColumns) {
		t.Skip("Skipping table with only primary key columns")
	}

	seed := randomize.NewSeed()
	var err error
	o := &WithdrawalFiat{}
	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatColumnsWithDefault...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Insert(ctx, tx, boil.Infer()); err != nil {
		t.Error(err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}

	if count != 1 {
		t.Error("want one record, got:", count)
	}

	if err = randomize.Struct(seed, o, withdrawalFiatDBTypes, true, withdrawalFiatPrimaryKeyColumns...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	// Remove Primary keys and unique columns from what we plan to update
	var fields []string
	if strmangle.StringSliceMatch(withdrawalFiatAllColumns, withdrawalFiatPrimaryKeyColumns) {
		fields = withdrawalFiatAllColumns
	} else {
		fields = strmangle.SetComplement(
			withdrawalFiatAllColumns,
			withdrawalFiatPrimaryKeyColumns,
		)
	}

	value := reflect.Indirect(reflect.ValueOf(o))
	typ := reflect.TypeOf(o).Elem()
	n := typ.NumField()

	updateMap := M{}
	for _, col := range fields {
		for i := 0; i < n; i++ {
			f := typ.Field(i)
			if f.Tag.Get("boil") == col {
				updateMap[col] = value.Field(i).Interface()
			}
		}
	}

	slice := WithdrawalFiatSlice{o}
	if rowsAff, err := slice.UpdateAll(ctx, tx, updateMap); err != nil {
		t.Error(err)
	} else if rowsAff != 1 {
		t.Error("wanted one record updated but got", rowsAff)
	}
}

func testWithdrawalFiatsUpsert(t *testing.T) {
	t.Parallel()

	if len(withdrawalFiatAllColumns) == len(withdrawalFiatPrimaryKeyColumns) {
		t.Skip("Skipping table with only primary key columns")
	}

	seed := randomize.NewSeed()
	var err error
	// Attempt the INSERT side of an UPSERT
	o := WithdrawalFiat{}
	if err = randomize.Struct(seed, &o, withdrawalFiatDBTypes, true); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	ctx := context.Background()
	tx := MustTx(boil.BeginTx(ctx, nil))
	defer func() { _ = tx.Rollback() }()
	if err = o.Upsert(ctx, tx, false, nil, boil.Infer(), boil.Infer()); err != nil {
		t.Errorf("Unable to upsert WithdrawalFiat: %s", err)
	}

	count, err := WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}
	if count != 1 {
		t.Error("want one record, got:", count)
	}

	// Attempt the UPDATE side of an UPSERT
	if err = randomize.Struct(seed, &o, withdrawalFiatDBTypes, false, withdrawalFiatPrimaryKeyColumns...); err != nil {
		t.Errorf("Unable to randomize WithdrawalFiat struct: %s", err)
	}

	if err = o.Upsert(ctx, tx, true, nil, boil.Infer(), boil.Infer()); err != nil {
		t.Errorf("Unable to upsert WithdrawalFiat: %s", err)
	}

	count, err = WithdrawalFiats().Count(ctx, tx)
	if err != nil {
		t.Error(err)
	}
	if count != 1 {
		t.Error("want one record, got:", count)
	}
}


text:
package com.fuyoul.sanwenseller.bean.reqhttp;

import com.fuyoul.sanwenseller.bean.reshttp.ResTagBean;

import java.io.Serializable;
import java.util.List;

/**
 * @author: chen
 * @CreatDate: 2017\10\31 0031
 * @Desc:
 */

public class ReqRegistMasterInfo implements Serializable {

    private String realName;//姓名
    private long userInfoId;//id
    private String bankName;//开户银行名称
    private String idCard;//身份证号码
    private String bankCard;//银行卡号
    private String idCardFront;//正面身份照
    private String idCardBack;//反面身份照
    private String selfExp;//个人经历
    private String selfInfo;//个人简介
    private List<ResTagBean> labelList;

    public long getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(long userInfoId) {
        this.userInfoId = userInfoId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getBankCard() {
        return bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public String getIdCardFront() {
        return idCardFront;
    }

    public void setIdCardFront(String idCardFront) {
        this.idCardFront = idCardFront;
    }

    public String getIdCardBack() {
        return idCardBack;
    }

    public void setIdCardBack(String idCardBack) {
        this.idCardBack = idCardBack;
    }

    public String getSelfExp() {
        return selfExp;
    }

    public void setSelfExp(String selfExp) {
        this.selfExp = selfExp;
    }

    public String getSelfInfo() {
        return selfInfo;
    }

    public void setSelfInfo(String selfInfo) {
        this.selfInfo = selfInfo;
    }

    public List<ResTagBean> getLabelList() {
        return labelList;
    }

    public void setLabelList(List<ResTagBean> labelList) {
        this.labelList = labelList;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import type { Pagination } from "./pagination";

export type Bookmark = {
  name: string;
  country: string;
  url: string;
  links: string;
  tags: Array<string>;
};

export type BookmarkCollection = {
  data: Array<Bookmark>;
  pagination: Pagination;
};

export type BookmarkAdmin = {
  id: number;
  name: string;
  country: string;
  url: string;
  links: string;
  tags: Array<string>;
  created_at: string;
  updated_at: string;
};

export type BookmarkAdminCollection = {
  data: Array<BookmarkAdmin>;
  pagination: Pagination;
};


text:
ぷろ生ちゃんのAndroid Wear Watch faceです。
Android Wear1.xでアナログのWatch Faceを作るシンプルなサンプルです。
![preview](https://raw.githubusercontent.com/kenz/pronamawatch/master/wear/src/main/res/drawable-nodpi/preview_analog.png)


text:
package net.devh.boot.grpc.test.util;

import static org.junit.jupiter.api.DynamicTest.dynamicTest;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.function.Executable;

public class DynamicTestCollection implements Iterable<DynamicTest> {

    private final List<DynamicTest> tests = new ArrayList<>();

    public static DynamicTestCollection create() {
        return new DynamicTestCollection();
    }

    private DynamicTestCollection() {}

    @Override
    public Iterator<DynamicTest> iterator() {
        return this.tests.iterator();
    }

    public DynamicTestCollection add(final String name, final Executable executable) {
        this.tests.add(dynamicTest(name, executable));
        return this;
    }

}


text:
if [ ! -e ~/.local.zsh ]; then
    echo "Make ~/.local.zsh"
    cat <<EOF > ~/.local.zsh
# -*- mode: sh -*-
# This area is for local configuration which is depend on your environment.
EOF
fi

if [ ! -e ~/.gitconfig.local ]; then
    echo "Make ~/.gitconfig.local"
    cat <<EOF > ~/.gitconfig.local
# -*- mode: gitconfig -*-
EOF
fi

echo "Finished"
exit 0


text:
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module KMC.SymbolicSST.ActionSST(ActionSST, ConstOrAnyLab(..), actionToSST) where

import           Data.Functor.Identity
import qualified Data.Map as M
import           Data.Maybe
import qualified Data.Set as S
import           KMC.Kleenex.Actions (RegAction(..))
import           KMC.Kleenex.Syntax (RegIdent(..))
import           KMC.RangeSet (RangeSet)
import           KMC.SymbolicFST (FST(..))
import qualified KMC.SymbolicFST as FST
import           KMC.SymbolicFST.ActionMachine (ActionMachine, CodeInputLab(..), DecodeFunc(..))
import           KMC.SymbolicSST
import           KMC.Theories

{-
Action machines are deterministic by construction, and thus may be seen as a
deterministic SST with only one register. Register effects adjoined to the
output alphabet can also be interpreted as SST actions.
-}

type ActionSST st digit sigma var
  = SST st (ConstOrAnyLab digit) (DecodeFunc (RangeSet sigma) digit (Identity sigma)) var

-------------
-- Predicates
-------------

-- | Single-symbol data type representing labels for action SSTs
data ConstOrAnyLab b = ConstLab b -- ^ Read exactly this symbol
                     | AnyLab     -- ^ Read any symbol
  deriving (Eq, Ord)

instance (Eq b) => SetLike (ConstOrAnyLab b) b where
  member _ AnyLab = True
  member x (ConstLab y) = x == y

-----------------
-- SST generation
-----------------

actionToSST :: forall st sigma digit.
               (Ord st, Ord sigma, Enum sigma, Bounded sigma, Enum digit, Bounded digit)
               => ActionMachine st sigma RegAction digit -> ActionSST (st, Int) digit sigma Int
actionToSST actM = construct' (fstI actM, 0) edges outs
  where
    regs = M.fromList [ (r, maxBound - i) | r <- S.toList (registers actM) | i <- [0..] ]
           :: M.Map RegIdent Int
    (edges, outs) = go (S.singleton (fstI actM, 0)) S.empty [] []

    go ws states es os
      | S.null ws = (es, os)
      | (s, ws') <- S.deleteFindMin ws, S.member s states = go ws' states es os
      | (s@(q,h),ws') <- S.deleteFindMin ws =
          let (y, q') = followEps actM q
              (h', kappa) = interp regs h y
                :: (Int, RegisterUpdate Int (DecodeFunc (RangeSet sigma) digit (Identity sigma)))
              os' = if S.member q' (fstF actM) then
                      [(s, evalUpdateStringFunc [error "input function emitted along epsilon path"]
                           $ fromMaybe [VarA 0] (M.lookup 0 kappa))]
                    else []
              es' = [ (s, ps, composeRegisterUpdate kappa ru, s') | (ps, ru, s') <- next actM regs (q',h') ]
              ws'' = S.fromList [ s' | (_, _, _, s') <- es' ]
              states' = S.insert s states
          in go (S.union ws'' ws') states' (es' ++ es) (os' ++ os)

-- | Extract all occurrences of register identifiers in an action machine
registers :: ActionMachine st sigma RegAction digit -> S.Set RegIdent
registers actM = S.unions [ ext l | (_, l, _) <- FST.edgesToList $ fstE actM ]
  where
    ext (Left (_, DecodeArg _)) = S.empty
    ext (Left (_, DecodeConst xs)) = S.fromList $ concatMap extAct [ act | Right act <- xs ]
    ext (Right xs) = S.fromList $ concatMap extAct [ act | Right act <- xs ]

    extAct Push = []
    extAct (Pop r) = [r]
    extAct (Write r) = [r]

-- | Interpret a sequence of action symbols as a register update
interp :: M.Map RegIdent Int -> Int -> [Either sigma RegAction]
       -> (Int, RegisterUpdate Int (DecodeFunc (RangeSet sigma) digit (Identity sigma)))
interp regs = go
  where
    go h [] = (h, M.empty)
    go h (Left a:xs) =
      let (h', kappa) = go h xs
          kappa' = M.singleton h [VarA h, ConstA [a]]
      in (h', composeRegisterUpdate kappa' kappa)
    go h (Right Push:xs) =
      let (h', kappa) = go (h+1) xs
      in (h', kappa)
    go h (Right (Pop r):xs) =
      let (h', kappa) = go (h-1) xs
          kappa' = M.fromList [(h, []), (regs M.! r, [VarA h])]
      in (h', composeRegisterUpdate kappa' kappa)
    go h (Right (Write r):xs) =
      let (h', kappa) = go h xs
          kappa' = M.fromList [(regs M.! r, []), (h, [VarA h, VarA $ regs M.! r])]
      in (h', composeRegisterUpdate kappa' kappa)

followEps :: (Ord st) => ActionMachine st sigma act digit -> st -> ([Either sigma act], st)
followEps actM q =
  case FST.fstEvalEpsilonEdges actM q of
  []          -> ([], q)
  [(out, q')] -> let (out', q'') = followEps actM q' in (out ++ out', q'')
  _           -> error "non-deterministic action machine"

next :: (Ord st)
     => ActionMachine st sigma RegAction digit
     -> M.Map RegIdent Int
     -> (st, Int)
     -> [([ConstOrAnyLab digit]
         ,RegisterUpdate Int (DecodeFunc (RangeSet sigma) digit (Identity sigma))
         ,(st, Int))]
next actM regs (q, h) = do
  (p, f, q'') <- fromMaybe [] (M.lookup q (FST.eForward . fstE $ actM))
  let ps           = case p of InputAny k    -> replicate k AnyLab
                               InputConst bs -> map ConstLab bs
  let (us, q')     = followEps actM q''
  let (h'', kappa) = case f of
                     DecodeConst c -> interp regs h c
                     DecodeArg es  -> (h, M.singleton h [VarA h, FuncA (DecodeArg es)])
  let (h', kappa') = interp regs h'' us
  return (ps, composeRegisterUpdate kappa kappa', (q', h'))


text:
from hy.compiler import hy_compile, HyTypeError
from hy.models import HyObject, HyExpression, HySymbol, replace_hy_obj
from hy.lex import tokenize, LexException
from hy.errors import HyIOError

from io import open
import re
import marshal
import struct
import imp
import sys
import ast
import inspect
import os
import __future__

from hy._compat import PY3, PY34, MAGIC, builtins, long_type, wr_long
from hy._compat import string_types

def ast_compile(ast, filename, mode):
    """Compile AST.
    Like Python's compile, but with some special flags."""
    flags = (__future__.CO_FUTURE_DIVISION |
             __future__.CO_FUTURE_PRINT_FUNCTION)
    return compile(ast, filename, mode, flags)

def import_buffer_to_hst(buf):
    """Import content from buf and return a Hy AST."""
    return HyExpression([HySymbol("do")] + tokenize(buf + "\n"))

def import_file_to_hst(fpath):
    """Import content from fpath and return a Hy AST."""
    try:
        with open(fpath, 'r', encoding='utf-8') as f:
            buf = f.read()
        # Strip the shebang line, if there is one.
        buf = re.sub(r'\A#!.*', '', buf)
        return import_buffer_to_hst(buf)
    except IOError as e:
        raise HyIOError(e.errno, e.strerror, e.filename)

def import_buffer_to_ast(buf, module_name):
    """ Import content from buf and return a Python AST."""
    return hy_compile(import_buffer_to_hst(buf), module_name)

def import_file_to_ast(fpath, module_name):
    """Import content from fpath and return a Python AST."""
    return hy_compile(import_file_to_hst(fpath), module_name)

def import_file_to_module(module_name, fpath, loader=None):
    """Import Hy source from fpath and put it into a Python module.

    If there's an up-to-date byte-compiled version of this module, load that
    instead. Otherwise, byte-compile the module once we're done loading it, if
    we can.

    Return the module."""

    module = None

    bytecode_path = get_bytecode_path(fpath)
    try:
        source_mtime = int(os.stat(fpath).st_mtime)
        with open(bytecode_path, 'rb') as bc_f:
            # The first 4 bytes are the magic number for the version of Python
            # that compiled this bytecode.
            bytecode_magic = bc_f.read(4)
            # The next 4 bytes, interpreted as a little-endian 32-bit integer,
            # are the mtime of the corresponding source file.
            bytecode_mtime, = struct.unpack('<i', bc_f.read(4))
    except (IOError, OSError):
        pass
    else:
        if bytecode_magic == MAGIC and bytecode_mtime >= source_mtime:
            # It's a cache hit. Load the byte-compiled version.
            if PY3:
                # As of Python 3.6, imp.load_compiled still exists, but it's
                # deprecated. So let's use SourcelessFileLoader instead.
                from importlib.machinery import SourcelessFileLoader
                module = (SourcelessFileLoader(module_name, bytecode_path).
                          load_module(module_name))
            else:
                module = imp.load_compiled(module_name, bytecode_path)

    if not module:
        # It's a cache miss, so load from source.
        sys.modules[module_name] = None
        try:
            _ast = import_file_to_ast(fpath, module_name)
            module = imp.new_module(module_name)
            module.__file__ = fpath
            code = ast_compile(_ast, fpath, "exec")
            if not os.environ.get('PYTHONDONTWRITEBYTECODE'):
                try:
                    write_code_as_pyc(fpath, code)
                except (IOError, OSError):
                    # We failed to save the bytecode, probably because of a
                    # permissions issue. The user only asked to import the
                    # file, so don't bug them about it.
                    pass
            eval(code, module.__dict__)
        except (HyTypeError, LexException) as e:
            if e.source is None:
                with open(fpath, 'rt') as fp:
                    e.source = fp.read()
                e.filename = fpath
            raise
        except Exception:
            sys.modules.pop(module_name, None)
            raise
        sys.modules[module_name] = module
        module.__name__ = module_name

    module.__file__ = fpath
    if loader:
        module.__loader__ = loader
    if is_package(module_name):
        module.__path__ = []
        module.__package__ = module_name
    else:
        module.__package__ = module_name.rpartition('.')[0]

    return module

def import_buffer_to_module(module_name, buf):
    try:
        _ast = import_buffer_to_ast(buf, module_name)
        mod = imp.new_module(module_name)
        eval(ast_compile(_ast, "", "exec"), mod.__dict__)
    except (HyTypeError, LexException) as e:
        if e.source is None:
            e.source = buf
            e.filename = '<stdin>'
        raise
    return mod

def hy_eval(hytree, namespace=None, module_name=None, ast_callback=None):
    """``eval`` evaluates a quoted expression and returns the value. The optional
    second and third arguments specify the dictionary of globals to use and the
    module name. The globals dictionary defaults to ``(local)`` and the module
    name defaults to the name of the current module.

       => (eval '(print "Hello World"))
       "Hello World"

    If you want to evaluate a string, use ``read-str`` to convert it to a
    form first:

       => (eval (read-str "(+ 1 1)"))
       2"""
    if namespace is None:
        frame = inspect.stack()[1][0]
        namespace = inspect.getargvalues(frame).locals
    if module_name is None:
        m = inspect.getmodule(inspect.stack()[1][0])
        module_name = '__eval__' if m is None else m.__name__

    foo = HyObject()
    foo.start_line = 0
    foo.end_line = 0
    foo.start_column = 0
    foo.end_column = 0
    replace_hy_obj(hytree, foo)

    if not isinstance(module_name, string_types):
        raise HyTypeError(foo, "Module name must be a string")

    _ast, expr = hy_compile(hytree, module_name, get_expr=True)

    # Spoof the positions in the generated ast...
    for node in ast.walk(_ast):
        node.lineno = 1
        node.col_offset = 1

    for node in ast.walk(expr):
        node.lineno = 1
        node.col_offset = 1

    if ast_callback:
        ast_callback(_ast, expr)

    if not isinstance(namespace, dict):
        raise HyTypeError(foo, "Globals must be a dictionary")

    # Two-step eval: eval() the body of the exec call
    eval(ast_compile(_ast, "<eval_body>", "exec"), namespace)

    # Then eval the expression context and return that
    return eval(ast_compile(expr, "<eval>", "eval"), namespace)

def write_hy_as_pyc(fname):
    _ast = import_file_to_ast(fname,
                              os.path.basename(os.path.splitext(fname)[0]))
    code = ast_compile(_ast, fname, "exec")
    write_code_as_pyc(fname, code)

def write_code_as_pyc(fname, code):
    st = os.stat(fname)
    timestamp = long_type(st.st_mtime)

    cfile = get_bytecode_path(fname)
    try:
        os.makedirs(os.path.dirname(cfile))
    except (IOError, OSError):
        pass

    with builtins.open(cfile, 'wb') as fc:
        fc.write(MAGIC)
        wr_long(fc, timestamp)
        if PY3:
            wr_long(fc, st.st_size)
        marshal.dump(code, fc)

class MetaLoader(object):
    def __init__(self, path):
        self.path = path

    def load_module(self, fullname):
        if fullname in sys.modules:
            return sys.modules[fullname]

        if not self.path:
            return

        return import_file_to_module(fullname, self.path, self)

class MetaImporter(object):
    def find_on_path(self, fullname):
        fls = ["%s/__init__.hy", "%s.hy"]
        dirpath = "/".join(fullname.split("."))

        for pth in sys.path:
            pth = os.path.abspath(pth)
            for fp in fls:
                composed_path = fp % ("%s/%s" % (pth, dirpath))
                if os.path.exists(composed_path):
                    return composed_path

    def find_module(self, fullname, path=None):
        path = self.find_on_path(fullname)
        if path:
            return MetaLoader(path)

sys.meta_path.insert(0, MetaImporter())
sys.path.insert(0, "")

def is_package(module_name):
    mpath = os.path.join(*module_name.split("."))
    for path in map(os.path.abspath, sys.path):
        if os.path.exists(os.path.join(path, mpath, "__init__.hy")):
            return True
    return False

def get_bytecode_path(source_path):
    if PY34:
        import importlib.util
        return importlib.util.cache_from_source(source_path)
    elif hasattr(imp, "cache_from_source"):
        return imp.cache_from_source(source_path)
    else:
        # If source_path has a file extension, replace it with ".pyc".
        # Otherwise, just append ".pyc".
        d, f = os.path.split(source_path)
        return os.path.join(d, re.sub(r"(?:\.[^.]+)?\Z", ".pyc", f))


text:
package org.apache.pulsar.common.util;

import java.io.PrintWriter;
import java.io.StringWriter;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.apache.pulsar.common.policies.data.ErrorData;

/**
 * Exception used to provide better error messages to clients of the REST API.
 */
@SuppressWarnings("serial")
public class RestException extends WebApplicationException {
    public static String getExceptionData(Throwable t) {
        StringWriter writer = new StringWriter();
        writer.append("\n --- An unexpected error occurred in the server ---\n\n");
        if (t != null) {
            writer.append("Message: ").append(t.getMessage()).append("\n\n");
        }
        writer.append("Stacktrace:\n\n");

        if (t != null) {
            t.printStackTrace(new PrintWriter(writer));
        }
        return writer.toString();
    }

    public RestException(Response.Status status, String message) {
        this(status.getStatusCode(), message);
    }

    public RestException(int code, String message) {
        super(message, Response.status(code).entity(new ErrorData(message)).type(MediaType.APPLICATION_JSON).build());
    }

    public RestException(Throwable t) {
        super(getResponse(t));
    }

    private static Response getResponse(Throwable t) {
        if (t instanceof WebApplicationException) {
            WebApplicationException e = (WebApplicationException) t;
            return e.getResponse();
        } else {
            return Response
                .status(Status.INTERNAL_SERVER_ERROR)
                .entity(getExceptionData(t))
                .type(MediaType.TEXT_PLAIN)
                .build();
        }
    }
}


text:
cd "$(dirname "${BASH_SOURCE}")" && source "utils.sh"

main() {
    crontab ~/Dropbox/Backup/crontab_backup
}

main


text:
namespace Umbraco.Core.Configuration
{
    public interface ICoreDebug
    {
        bool DumpOnTimeoutThreadAbort { get; }
        bool LogUncompletedScopes { get; }
    }
}


text:
import { BaseEvents } from "../../modules/uv-shared-module/BaseEvents";
import { BaseExtension } from "../../modules/uv-shared-module/BaseExtension";
import { EbookLeftPanel } from "../../modules/uv-ebookleftpanel-module/EbookLeftPanel";
import { Events } from "./Events";
import { DownloadDialogue } from "./DownloadDialogue";
import { EbookCenterPanel } from "../../modules/uv-ebookcenterpanel-module/EbookCenterPanel";
import { FooterPanel } from "../../modules/uv-ebookfooterpanel-module/FooterPanel";
import { FooterPanel as MobileFooterPanel } from "../../modules/uv-ebookmobilefooterpanel-module/MobileFooter";
import { HeaderPanel } from "../../modules/uv-shared-module/HeaderPanel";
import { IEbookExtension } from "./IEbookExtension";
import { MoreInfoDialogue } from "../../modules/uv-dialogues-module/MoreInfoDialogue";
import { MoreInfoRightPanel } from "../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel";
import { SettingsDialogue } from "./SettingsDialogue";
import { ShareDialogue } from "./ShareDialogue";
import { IEbookExtensionData } from "./IEbookExtensionData";
import { ProgressDialogue } from "../../modules/uv-dialogues-module/ProgressDialogue";

const PRINT_IFRAME = "ifrmPrintEbookContent";

export class Extension extends BaseExtension implements IEbookExtension {

    $downloadDialogue: JQuery;
    $moreInfoDialogue: JQuery;
    $settingsDialogue: JQuery;
    $progressDialogue: JQuery;
    $shareDialogue: JQuery;
    centerPanel: EbookCenterPanel;
    downloadDialogue: DownloadDialogue;
    footerPanel: FooterPanel;
    headerPanel: HeaderPanel;
    leftPanel: EbookLeftPanel;
    mobileFooterPanel: MobileFooterPanel;
    moreInfoDialogue: MoreInfoDialogue;
    rightPanel: MoreInfoRightPanel;
    settingsDialogue: SettingsDialogue;
    progressDialogue: ProgressDialogue;
    shareDialogue: ShareDialogue;
    cfiFragment: string;

    private _ebook: any;
    private _printDocument: any;
    private _activePrint = false;

    create(): void {
        super.create();

        this.component.subscribe(BaseEvents.CANVAS_INDEX_CHANGED, (canvasIndex: number) => {
            this.viewCanvas(canvasIndex);
        });

        this.component.subscribe(Events.CFI_FRAGMENT_CHANGED, (cfi: string) => {
            this.cfiFragment = cfi;
            this.fire(Events.CFI_FRAGMENT_CHANGED, this.cfiFragment);
        });

        this.component.subscribe(Events.EBOOK_READY, (ebook) => {
            this._ebook = ebook;
        });

        this.component.subscribe(Events.PRINT, () => {
            this.printEbook();
        });

        //Remove the print doc iframe if already exists
        let printDocIframe = document.getElementById(PRINT_IFRAME);
        if (printDocIframe) {
            printDocIframe.remove();
        }
    }

    dependencyLoaded(_index: number, _dep: any): void {

    }

    createModules(): void {
        super.createModules();

        if (this.isHeaderPanelEnabled()) {
            this.headerPanel = new HeaderPanel(this.shell.$headerPanel);
        } else {
            this.shell.$headerPanel.hide();
        }

        if (this.isLeftPanelEnabled()) {
            this.leftPanel = new EbookLeftPanel(this.shell.$leftPanel);
        } else {
            this.shell.$leftPanel.hide();
        }

        this.centerPanel = new EbookCenterPanel(this.shell.$centerPanel);

        if (this.isRightPanelEnabled()) {
            this.rightPanel = new MoreInfoRightPanel(this.shell.$rightPanel);
        } else {
            this.shell.$rightPanel.hide();
        }

        if (this.isFooterPanelEnabled()) {
            this.footerPanel = new FooterPanel(this.shell.$footerPanel);
            this.mobileFooterPanel = new MobileFooterPanel(this.shell.$mobileFooterPanel);
        } else {
            this.shell.$footerPanel.hide();
        }

        this.$moreInfoDialogue = $('

');
        this.shell.$overlays.append(this.$moreInfoDialogue);
        this.moreInfoDialogue = new MoreInfoDialogue(this.$moreInfoDialogue);

        this.$shareDialogue = $('

');
        this.shell.$overlays.append(this.$shareDialogue);
        this.shareDialogue = new ShareDialogue(this.$shareDialogue);

        this.$downloadDialogue = $('

');
        this.shell.$overlays.append(this.$downloadDialogue);
        this.downloadDialogue = new DownloadDialogue(this.$downloadDialogue);

        this.$settingsDialogue = $('

');
        this.shell.$overlays.append(this.$settingsDialogue);
        this.settingsDialogue = new SettingsDialogue(this.$settingsDialogue);

        this.$progressDialogue = $('

');
        this.shell.$overlays.append(this.$progressDialogue);
        this.progressDialogue = new ProgressDialogue(this.$progressDialogue);
        setTimeout(this.showDocLoadProgress.bind(this), 3000);

        if (this.isHeaderPanelEnabled()) {
            this.headerPanel.init();
        }

        if (this.isLeftPanelEnabled()) {
            this.leftPanel.init();
        }

        if (this.isRightPanelEnabled()) {
            this.rightPanel.init();
        }

        if (this.isFooterPanelEnabled()) {
            this.footerPanel.init();
        }
    }

    showDocLoadProgress() {
        if (this._ebook) {
            return;
        }

        if (this.progressDialogue.content.docLoadingText) {
            this.progressDialogue.setOptions({ label: this.progressDialogue.content.docLoadingText });
        }

        this.progressDialogue.open();

        let num = 1;
        let interval = setInterval(() => {
            if (this._ebook) {
                this.progressDialogue.setValue(100);
                setTimeout(()=>{
                    this.progressDialogue.close();
                }, 200);
                clearInterval(interval);
                return;
            }

            if (num + 2 == 100) {
                return; //hack - stop the progress bar till doc ready
            }

            this.progressDialogue.setValue(++num);
        }, 200)
    }

    getPrintContentWindow(iframe){
        return iframe.contentWindow;
    }

    finalizePrint(contentWindow){
        this._activePrint = false;
        this.progressDialogue.close();
        contentWindow.print();
    }

    printEbook(){
        if (!this._ebook){
            alert('Ebook is not loaded yet');
            return;
        }

        //return if printing is already in progress
        if (this._activePrint) {
            return;
        }

        this._activePrint = true;
        this.initPrintProgress();

        let printDocIframe = document.getElementById(PRINT_IFRAME) as HTMLIFrameElement;
        if (printDocIframe){
            this.finalizePrint(this.getPrintContentWindow(printDocIframe));
            return;
        }

        this.renderContents().then(()=>{
            let docHead = this._printDocument.head || this._printDocument.getElementsByTagName('head')[0];

            //add viewport meta tag to print document
            let meta = document.createElement('meta');
            meta.setAttribute('name', 'viewport');
            meta.content = "width=device-width, initial-scale=1";
            docHead.appendChild(meta);

            //Add style to doc for page break after each chapter
            let style = document.createElement('style');
            style.type = 'text/css';
            style.appendChild(document.createTextNode("body{margin: 0; padding: 0;} body > .section{display: block; position:relative; min-height:1px; page-break-after: avoid; page-break-before: always;}"));
            docHead.appendChild(style);

            //set document title
            let docHeadTitle = docHead.getElementsByTagName("title")[0];
            if (docHeadTitle) {
                docHeadTitle.innerText = this._ebook.packaging.metadata.title;
            } else {
                docHeadTitle = document.createElement("title");
                docHeadTitle.innerText = this._ebook.packaging.metadata.title;
                docHead.appendChild(docHeadTitle);
            }

            this.createIframeAndExecPrint();
        });
    }

    createIframeAndExecPrint():void {
        //create an iframe to load the doc contents
        let iframe = document.createElement('iframe');
        iframe.setAttribute("id", "ifrmPrintEbookContent");
        iframe.setAttribute("style", "display:none;");

        //add iframe to body
        document.body.appendChild(iframe);

        // check if srcdoc supported for iframe for the browser
        if(("srcdoc" in iframe)){
            //add onload event to iframe
            iframe.onload = () => {
                this.finalizePrint(this.getPrintContentWindow(iframe));
            };

            //add doc html to iframe srcdoc
            iframe.setAttribute("srcdoc", this._printDocument.documentElement.innerHTML);
            return;
        }

        //if scrdoc not supported for the browser
        let contentWindow = this.getPrintContentWindow(iframe);
        contentWindow.document.write(this._printDocument.documentElement.innerHTML);

        setTimeout(() => {
            this.finalizePrint(contentWindow);
        }, 1000);
    }

    renderContents() {
        let tocCount = this._ebook.spine.length;
        let currentTocIndex = -1;

        const renderNextSectionContent = (resolve, reject) => {
          if (++currentTocIndex >= tocCount) {
            resolve();
            return;
          }

          this.renderSectionContent(currentTocIndex)
            .then(() => {
                renderNextSectionContent(resolve, reject);
            }, reject);
        };

        return new Promise(renderNextSectionContent);
     }

     renderSectionContent(index) {
        const section = this._ebook.spine.get(index);
        if (!section) {
            return Promise.resolve();
        }

        this.progressDialogue.setValue(index + 1);
        return section.render(this._ebook.load.bind(this._ebook))
        .then(htmlDoc => {
            let domparser = new DOMParser()
            let doc = domparser.parseFromString(htmlDoc, "text/html");
            if(doc) {
                if(index == 0) {
                    this._printDocument = doc;
                    return;
                }

                //get css class and style if any for the section content
                let docClass = doc.body.getAttribute("class") || "";
                let docStyle = doc.body.getAttribute("style") || "";

                //attach the cssClass and style to section wrapper
                const sectionWrapper = document.createElement('div');
                sectionWrapper.setAttribute("class", (docClass ? docClass + " " : "") + "section section-" + index );
                sectionWrapper.setAttribute("style", docStyle);

                sectionWrapper.innerHTML= doc.body.innerHTML;
                this._printDocument.body.appendChild(sectionWrapper);
            }
        });
    }

    isLeftPanelEnabled() {
        return true;
    }

    render() {
        super.render();
        this.checkForCFIParam();
    }

    getEmbedScript(template: string, width: number, height: number): string {
        const appUri: string = this.getAppUri();

        const iframeSrc: string = `${appUri}#?manifest=${this.helper.manifestUri}&cfi=${this.cfiFragment}`;
        return Utils.Strings.format(template, iframeSrc, width.toString(), height.toString());
    }

    checkForCFIParam() {
        const cfi: string | null = (<IEbookExtensionData>this.data).cfi;

        if (cfi) {
            this.component.publish(Events.CFI_FRAGMENT_CHANGED, cfi);
        }
    }

    initPrintProgress() {
        const options = {
            maxValue: this._ebook.spine.length,
            showPercentage: true
        };

        if(this.progressDialogue.content.docPrintProgressText) {
            options["label"] = this.progressDialogue.content.docPrintProgressText;
        }

        this.progressDialogue.setOptions(options);
        this.progressDialogue.open();
    }
}


text:
import unittest, subprocess, os
from rdkit import RDConfig

class TestCase(unittest.TestCase):
  def test1Github1406(self):
    with open('data/simple.smi') as inf:
      p = subprocess.run(('python', 'rfrag.py'),stdin=inf,stdout=subprocess.PIPE)
    self.assertFalse(p.returncode)
    self.assertEqual(p.stdout,b'''c1ccccc1,benzene,,
Cc1ccccc1,toluene,,C[*:1].c1ccc(cc1)[*:1]
''')

if __name__ == '__main__':
  import sys
  if sys.hexversion >= 0x3050000:
    unittest.main()
  else:
    print('Python >=3.5 required to run tests')


text:
#ifndef  OS_CPU_H
#define  OS_CPU_H

#ifdef   OS_CPU_GLOBALS
#define  OS_CPU_EXT
#else
#define  OS_CPU_EXT  extern
#endif

#ifndef  OS_CPU_FPU_EN
#define  OS_CPU_FPU_EN    0                      /* HW floating point support disabled by default      */
#endif

// NST_ADD
#ifndef  OS_CPU_ARM_DCC_EN
#define  OS_CPU_ARM_DCC_EN      0
#endif

/*
*********************************************************************************************************
*                                   INTERRUPT DISABLE TIME MEASUREMENT
*********************************************************************************************************
*/

#define  OS_CPU_INT_DIS_MEAS_EN    0

/*
*********************************************************************************************************
*                                           EXCEPTION DEFINES
*********************************************************************************************************
*/

                                                                /* ARM exception IDs                                    */
#define  OS_CPU_ARM_EXCEPT_RESET                                                                    0x00
#define  OS_CPU_ARM_EXCEPT_UNDEF_INSTR                                                              0x01
#define  OS_CPU_ARM_EXCEPT_SWI                                                                      0x02
#define  OS_CPU_ARM_EXCEPT_PREFETCH_ABORT                                                           0x03
#define  OS_CPU_ARM_EXCEPT_DATA_ABORT                                                               0x04
#define  OS_CPU_ARM_EXCEPT_ADDR_ABORT                                                               0x05
#define  OS_CPU_ARM_EXCEPT_IRQ                                                                      0x06
#define  OS_CPU_ARM_EXCEPT_FIQ                                                                      0x07
#define  OS_CPU_ARM_EXCEPT_MAX                                                                      0x08

                                                                /* ARM exception vectors addresses                      */
#define  OS_CPU_ARM_EXCEPT_RESET_VECT_ADDR              (OS_CPU_ARM_EXCEPT_RESET          * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_UNDEF_INSTR_VECT_ADDR        (OS_CPU_ARM_EXCEPT_UNDEF_INSTR    * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_SWI_VECT_ADDR                (OS_CPU_ARM_EXCEPT_SWI            * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_PREFETCH_ABORT_VECT_ADDR     (OS_CPU_ARM_EXCEPT_PREFETCH_ABORT * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_DATA_ABORT_VECT_ADDR         (OS_CPU_ARM_EXCEPT_DATA_ABORT     * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_ADDR_ABORT_VECT_ADDR         (OS_CPU_ARM_EXCEPT_ADDR_ABORT     * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_IRQ_VECT_ADDR                (OS_CPU_ARM_EXCEPT_IRQ            * 0x04 + 0x00)
#define  OS_CPU_ARM_EXCEPT_FIQ_VECT_ADDR                (OS_CPU_ARM_EXCEPT_FIQ            * 0x04 + 0x00)

                                                                /* ARM exception handlers addresses                     */
#define  OS_CPU_ARM_EXCEPT_RESET_HANDLER_ADDR           (OS_CPU_ARM_EXCEPT_RESET          * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_UNDEF_INSTR_HANDLER_ADDR     (OS_CPU_ARM_EXCEPT_UNDEF_INSTR    * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_SWI_HANDLER_ADDR             (OS_CPU_ARM_EXCEPT_SWI            * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_PREFETCH_ABORT_HANDLER_ADDR  (OS_CPU_ARM_EXCEPT_PREFETCH_ABORT * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_DATA_ABORT_HANDLER_ADDR      (OS_CPU_ARM_EXCEPT_DATA_ABORT     * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_ADDR_ABORT_HANDLER_ADDR      (OS_CPU_ARM_EXCEPT_ADDR_ABORT     * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_IRQ_HANDLER_ADDR             (OS_CPU_ARM_EXCEPT_IRQ            * 0x04 + 0x20)
#define  OS_CPU_ARM_EXCEPT_FIQ_HANDLER_ADDR             (OS_CPU_ARM_EXCEPT_FIQ            * 0x04 + 0x20)

                                                                /* ARM "Jump To Self" assembled instruction             */
#define  OS_CPU_ARM_INSTR_JUMP_TO_SELF                   0xEAFFFFFE
                                                                /* ARM "Jump To Exception Handler" assembled instruction*/
#define  OS_CPU_ARM_INSTR_JUMP_TO_HANDLER                0xE59FF018

/*
*********************************************************************************************************
*                                              DATA TYPES
*                                         (Compiler Specific)
*********************************************************************************************************
*/

typedef unsigned char  BOOLEAN;
typedef unsigned char  INT8U;                    /* Unsigned  8 bit quantity                           */
typedef signed   char  INT8S;                    /* Signed    8 bit quantity                           */
typedef unsigned short INT16U;                   /* Unsigned 16 bit quantity                           */
typedef signed   short INT16S;                   /* Signed   16 bit quantity                           */
typedef unsigned int   INT32U;                   /* Unsigned 32 bit quantity                           */
typedef signed   int   INT32S;                   /* Signed   32 bit quantity                           */
typedef float          FP32;                     /* Single precision floating point                    */
typedef double         FP64;                     /* Double precision floating point                    */

typedef unsigned int   OS_STK;                   /* Each stack entry is 32-bit wide                    */
typedef unsigned int   OS_CPU_SR;                /* Define size of CPU status register (PSR = 32 bits) */

/*
*********************************************************************************************************
*                                                ARM
*
* Method #1:  Disable/Enable interrupts using simple instructions.  After critical section, interrupts
*             will be enabled even if they were disabled before entering the critical section.
*             NOT IMPLEMENTED
*
* Method #2:  Disable/Enable interrupts by preserving the state of interrupts.  In other words, if
*             interrupts were disabled before entering the critical section, they will be disabled when
*             leaving the critical section.
*             NOT IMPLEMENTED
*
* Method #3:  Disable/Enable interrupts by preserving the state of interrupts.  Generally speaking you
*             would store the state of the interrupt disable flag in the local variable 'cpu_sr' and then
*             disable interrupts.  'cpu_sr' is allocated in all of uC/OS-II's functions that need to
*             disable interrupts.  You would restore the interrupt disable state by copying back 'cpu_sr'
*             into the CPU's status register.
*********************************************************************************************************
*/

#define  OS_CRITICAL_METHOD    3

#if      OS_CRITICAL_METHOD == 3

#if      OS_CPU_INT_DIS_MEAS_EN > 0

#define  OS_ENTER_CRITICAL()  {cpu_sr = OS_CPU_SR_Save();  \
                               OS_CPU_IntDisMeasStart();}
#define  OS_EXIT_CRITICAL()   {OS_CPU_IntDisMeasStop();   \
                               OS_CPU_SR_Restore(cpu_sr);}

#else

#define  OS_ENTER_CRITICAL()  {cpu_sr = gpRomHookFuncTbl->OS_CPU_SR_Save();}
#define  OS_EXIT_CRITICAL()   {gpRomHookFuncTbl->OS_CPU_SR_Restore(cpu_sr);}

#endif

#endif

/*
*********************************************************************************************************
*                                         ARM Miscellaneous
*********************************************************************************************************
*/

#define  OS_STK_GROWTH        1                   /* Stack grows from HIGH to LOW memory on ARM        */

#define  OS_TASK_SW()         gpRomHookFuncTbl->OSCtxSw()

/*
*********************************************************************************************************
*                                            GLOBAL VARIABLES
*********************************************************************************************************
*/

                                                  /* Variables used to measure interrupt disable time  */
#if OS_CPU_INT_DIS_MEAS_EN > 0
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasNestingCtr;
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasCntsEnter;
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasCntsExit;
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasCntsMax;
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasCntsDelta;
OS_CPU_EXT  INT16U  OS_CPU_IntDisMeasCntsOvrhd;
#endif

/*
*********************************************************************************************************
*                                              PROTOTYPES
*********************************************************************************************************
*/

#if OS_CRITICAL_METHOD == 3
       OS_CPU_SR  OS_CPU_SR_Save(void);           /* See OS_CPU_A.ASM                                  */
       void       OS_CPU_SR_Restore(OS_CPU_SR cpu_sr);
#endif

       void       OS_CPU_SR_INT_Dis(void);
       void       OS_CPU_SR_INT_En(void);
       void       OS_CPU_SR_FIQ_Dis(void);
       void       OS_CPU_SR_FIQ_En(void);
       void       OS_CPU_SR_IRQ_Dis(void);
       void       OS_CPU_SR_IRQ_En(void);

#if OS_CPU_FPU_EN > 0
       void       OS_CPU_FP_Init(void);           /* See OS_CPU_C.C                                    */
       void       OS_CPU_FP_Restore(void *pblk);
       void       OS_CPU_FP_Save(void *pblk);
#endif

       void       OSCtxSw(void);
       void       OSIntCtxSw(void);
       void       OSStartHighRdy(void);

       void       OS_CPU_InitExceptVect(void);

       void       OS_CPU_ARM_ExceptResetHndlr(void);
       void       OS_CPU_ARM_ExceptUndefInstrHndlr(void);
       void       OS_CPU_ARM_ExceptSwiHndlr(void);
       void       OS_CPU_ARM_ExceptPrefetchAbortHndlr(void);
       void       OS_CPU_ARM_ExceptDataAbortHndlr(void);
       void       OS_CPU_ARM_ExceptAddrAbortHndlr(void);
       void       OS_CPU_ARM_ExceptIrqHndlr(void);
       void       OS_CPU_ARM_ExceptFiqHndlr(void);

      void       OS_CPU_ExceptHndlr(INT32U  except_type);

#if OS_CPU_INT_DIS_MEAS_EN > 0
       void       OS_CPU_IntDisMeasInit(void);
       void       OS_CPU_IntDisMeasStart(void);
       void       OS_CPU_IntDisMeasStop(void);
       INT16U     OS_CPU_IntDisMeasTmrRd(void);
#endif

#if OS_CPU_ARM_DCC_EN > 0
       void       OSDCC_Handler(void);
#endif

      void CPU_IntDis(void);    // NST_ADD
      void CPU_IntEn(void);    // NST_ADD
      void CPU_EnterLowPower(void);    // NST_ADD
      void WDResetWDTimer( void ); // NST_ADD
      void PrintCpuUsage(void); // NST_ADD
#endif


text:
import { MinDB } from './mindb'

// Export the proxied class
export default new Proxy(new MinDB(), {
  get (target:MinDB, name:PropertyKey) {
    if (name in target) return target[name]
    // Return database if name is a string and found within the database list
    if (typeof name === 'string' && target.list().indexOf(name) !== -1) return target.get(name)
  },
  set (obj:MinDB, prop:PropertyKey, val:any):boolean {
    if (prop in obj) {
      obj[prop] = val
      return true
    }
    throw new Error(`Do not dynamically set values on MinDB.`)
  }
})


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_centerInParent="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="3dp"
        android:layout_marginRight="3dp"
        android:orientation="vertical" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >

            <ImageView
                android:id="@+id/image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/icon" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="3dp"
                android:layout_marginRight="3dp"
                android:orientation="vertical" >

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:orientation="horizontal" >

                    <TextView
                        android:id="@+id/name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:text="xxxx.apk"
                        android:textColor="#000" />

                    <TextView
                        android:id="@+id/tv_progress"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:gravity="center"
                        android:minWidth="60dp"
                        android:textColor="#000" />
                </LinearLayout>

                <ProgressBar
                    android:id="@+id/progressbar"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="4dp"
                    android:layout_marginTop="3dp"
                    android:max="100"
                    android:progress="0"
                    android:text="xxxx.apk" />
            </LinearLayout>
        </LinearLayout>

    </LinearLayout>

</RelativeLayout>


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Corydalis aurea var. crystallina Torr. & A.Gray

### Remarks
null


text:
module Spiceweasel
  # manages parsing of Nodes
  class Nodes
    include CommandHelper

    PROVIDERS = %w{bluebox clodo cs digital_ocean ec2 gandi google hp joyent kvm linode lxc openstack rackspace vagrant vcair vsphere}

    attr_reader :create, :delete

    def initialize(nodes, cookbooks, environments, roles, knifecommands, rootoptions) # rubocop:disable CyclomaticComplexity
      @create = []
      @delete = []
      chefclient = []
      create_command_options = {}

      return unless nodes

      Spiceweasel::Log.debug("nodes: #{nodes}")
      nodes.each do |node|
        name = node.keys.first
        names = name.split
        Spiceweasel::Log.debug("node: '#{name}' '#{node[name]}'")
        # get the node's run_list and options
        if node[name]
          run_list = process_run_list(node[name]["run_list"])
          Spiceweasel::Log.debug("node: '#{name}' run_list: '#{run_list}'")
          validate_run_list(name, run_list, cookbooks, roles) unless Spiceweasel::Config[:novalidation]
          options = ((node[name]["options"] || "") + " " + (rootoptions || "")).rstrip
          Spiceweasel::Log.debug("node: '#{name}' options: '#{options}'")
          validate_options(name, options, environments) unless Spiceweasel::Config[:novalidation]
          %w{allow_create_failure timeout}.each do |key|
            if node[name].key?(key)
              create_command_options[key] = node[name][key]
            end
          end
          additional_commands = node[name]["additional_commands"] || []
        end
        if Spiceweasel::Config[:chefclient]
          chefclient.push(process_chef_client(names, options, run_list))
        elsif Spiceweasel::Config[:node_only]
          process_nodes_only(names, options, run_list, create_command_options)
        else # create/delete
          # provider support
          if PROVIDERS.member?(names[0])
            count = names.length == 2 ? names[1] : 1
            process_providers(names, count, node[name]["name"], options, run_list, create_command_options, knifecommands)
          elsif names[0].start_with?("windows_")
            # windows node bootstrap support
            protocol = names.shift.split("_") # split on 'windows_ssh' etc
            names.each do |server|
              servercommand = "knife bootstrap #{protocol[0]} #{protocol[1]}#{Spiceweasel::Config[:knife_options]} #{server} #{options}"
              servercommand += " -r '#{run_list}'" unless run_list.empty?
              create_command(servercommand, create_command_options)
              delete_command("knife node#{Spiceweasel::Config[:knife_options]} delete #{server} -y")
              delete_command("knife client#{Spiceweasel::Config[:knife_options]} delete #{server} -y")
            end
          else
            # node bootstrap support
            name.split.each_with_index do |server, i|
              servercommand = node_numerate("knife bootstrap#{Spiceweasel::Config[:knife_options]} #{server} #{options}", i + 1, count)
              servercommand += " -r '#{run_list}'" unless run_list.empty?
              create_command(servercommand, create_command_options)
              delete_command("knife node#{Spiceweasel::Config[:knife_options]} delete #{server} -y")
              delete_command("knife client#{Spiceweasel::Config[:knife_options]} delete #{server} -y")
            end
          end
          unless additional_commands.empty?
            additional_commands.each do |cmd|
              create_command(cmd, create_command_options)
            end
          end
        end
      end
      if Spiceweasel::Config[:bulkdelete]
        delete_command("knife node#{Spiceweasel::Config[:knife_options]} bulk delete .* -y")
      end
      # remove repeats in chefclient and push into create_command
      chefclient.flatten.each_with_index { |x, i| create_command(x, create_command_options) unless x.eql?(chefclient[i - 1]) } if Spiceweasel::Config[:chefclient]
      # nodeonly
    end

    # ensure run_list contents are listed previously.
    def validate_run_list(node, run_list, cookbooks, roles)
      run_list.split(",").each do |item|
        if item.start_with?("recipe[")
          # recipe[foo] or recipe[foo::bar]
          cb = item.split(/\[|\]/)[1].split(":")[0]
          unless cookbooks.member?(cb)
            STDERR.puts "ERROR: '#{node}' run list cookbook '#{cb}' is missing from the list of cookbooks in the manifest."
            exit(-1)
          end
        elsif item.start_with?("role[")
          # role[blah]
          role = item.split(/\[|\]/)[1]
          unless roles.member?(role)
            STDERR.puts "ERROR: '#{node}' run list role '#{role}' is missing from the list of roles in the manifest."
            exit(-1)
          end
        else
          STDERR.puts "ERROR: '#{node}' run list '#{item}' is an invalid run list entry in the manifest."
          exit(-1)
        end
      end
    end

    # for now, just check that -E is legit
    def validate_options(node, options, environments)
      if options =~ /-E/ # check for environments
        env = options.split("-E")[1].split[0]
        unless environments.member?(env)
          STDERR.puts "ERROR: '#{node}' environment '#{env}' is missing from the list of environments in the manifest."
          exit(-1)
        end
      end
    end

    # handle --nodes-only
    def process_nodes_only(names, options, run_list, create_command_options) # rubocop:disable CyclomaticComplexity
      nodenames = []
      if PROVIDERS.member?(names[0])
        count = names.length == 2 ? names[1] : 1
        do_provider_members(count, nodenames, options)
      elsif names[0].start_with?("windows_")
        nodenames.push(names[1..-1])
      else # standard nodes
        nodenames.push(names)
      end
      nodenames.flatten.each do |node|
        node_names_flatten(create_command_options, node, run_list)
      end
    end

    def do_provider_members(count, nodenames, options)
      options.split.each do |opt|
        if opt =~ /^-N|^--node-name/
          optname = opt.sub(/-N|--node-name/, "").lstrip
          optname = options.split[options.split.find_index(opt) + 1] if optname.empty?
          count.to_i.times do |i|
            nodenames.push(node_numerate(optname, i + 1, count))
          end
        end
      end
    end

    def node_names_flatten(create_command_options, node, run_list)
      if File.directory?("nodes/")
        if File.exist?("nodes/#{node}.json")
          validate_node_file(node) unless Spiceweasel::Config[:novalidation]
          servercommand = "knife node from file #{node}.json #{Spiceweasel::Config[:knife_options]}".rstrip
        else
          STDERR.puts "'nodes/#{node}.json' not found, unable to validate or load node. Using 'knife node create' instead."
          servercommand = "knife node create -d #{node} #{Spiceweasel::Config[:knife_options]}".rstrip
        end
      else
        STDERR.puts "'nodes' directory not found, unable to validate or load nodes. Using 'knife node create' instead."
        servercommand = "knife node create -d #{node} #{Spiceweasel::Config[:knife_options]}".rstrip
      end
      create_command(servercommand, create_command_options)
      create_command("knife node run_list set #{node} '#{run_list}'", create_command_options) unless run_list.empty?
      delete_command("knife node#{Spiceweasel::Config[:knife_options]} delete #{node} -y")
      delete_command("knife client#{Spiceweasel::Config[:knife_options]} delete #{node} -y")
    end

    # validate individual node files
    def validate_node_file(name)
      # read in the file
      node = Chef::JSONCompat.from_json(IO.read("nodes/#{name}.json"))

      # check the node name vs. contents of the file
      return unless node["name"] != name

      STDERR.puts "ERROR: Node '#{name}' listed in the manifest does not match the name '#{node['name']}' within the nodes/#{name}.json file."
      exit(-1)
    end

    # manage all the provider logic
    def process_providers(names, count, name, options, run_list, create_command_options, knifecommands) # rubocop:disable CyclomaticComplexity
      provider = names[0]
      validate_provider(provider, names, count, options, knifecommands) unless Spiceweasel::Config[:novalidation]
      provided_names = []
      if name.nil? && options.split.index("-N") # pull this out for deletes
        name = options.split[options.split.index("-N") + 1]
        count.to_i.times { |i| provided_names << node_numerate(name, i + 1, count) } if name
      end

      # google can have names or numbers
      if provider.eql?("google") && names[1].to_i == 0
        do_google_numeric_provider(create_command_options, names, options, provided_names, run_list)
      elsif Spiceweasel::Config[:parallel]
        process_parallel(count, create_command_options, name, options, provider, run_list)
      else
        determine_cloud_provider(count, create_command_options, name, options, provider, run_list)
      end
      if Spiceweasel::Config[:bulkdelete] && provided_names.empty?
        do_bulk_delete(provider)
      else
        provided_names.each do |p_name|
          do_provided_names(p_name, provider)
        end
      end
    end

    def determine_cloud_provider(count, create_command_options, name, options, provider, run_list)
      count.to_i.times do |i|
        if provider.eql?("vsphere")
          server = node_numerate("knife #{provider}#{Spiceweasel::Config[:knife_options]} vm clone #{options}", i + 1, count)
        elsif provider.eql?("kvm")
          server = node_numerate("knife #{provider}#{Spiceweasel::Config[:knife_options]} vm create #{options}", i + 1, count)
        elsif provider.eql?("digital_ocean")
          server = node_numerate("knife #{provider}#{Spiceweasel::Config[:knife_options]} droplet create #{options}", i + 1, count)
        elsif provider.eql?("google")
          server = node_numerate("knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{name} #{options}", i + 1, count)
        else
          server = node_numerate("knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{options}", i + 1, count)
        end
        server += " -r '#{run_list}'" unless run_list.empty?
        create_command(server, create_command_options)
      end
    end

    def do_google_numeric_provider(create_command_options, names, options, provided_names, run_list)
      names[1..-1].each do |gname|
        server = "knife google#{Spiceweasel::Config[:knife_options]} server create #{gname} #{options}"
        server += " -r '#{run_list}'" unless run_list.empty?
        create_command(server, create_command_options)
        provided_names << gname
      end
    end

    def do_provided_names(p_name, provider)
      if ["kvm", "vsphere"].member?(provider)
        delete_command("knife #{provider} vm delete #{p_name} -y")
      elsif ["digital_ocean"].member?(provider)
        delete_command("knife #{provider} droplet destroy #{p_name} -y")
      else
        delete_command("knife #{provider} server delete #{p_name} -y")
      end
      delete_command("knife node#{Spiceweasel::Config[:knife_options]} delete #{p_name} -y")
      delete_command("knife client#{Spiceweasel::Config[:knife_options]} delete #{p_name} -y")
    end

    def do_bulk_delete(provider)
      if ["kvm", "vsphere"].member?(provider)
        if bundler?
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs bundle exec knife #{provider} vm delete -y")
        else
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs knife #{provider} vm delete -y")
        end
      elsif ["digital_ocean"].member?(provider)
        if bundler?
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs bundle exec knife #{provider} droplet destroy -y")
        else
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs knife #{provider} droplet destroy -y")
        end
      else
        if bundler?
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs bundle exec knife #{provider} server delete -y")
        else
          delete_command("knife node#{Spiceweasel::Config[:knife_options]} list | xargs knife #{provider} server delete -y")
        end
      end
    end

    def process_parallel(count, create_command_options, name, options, provider, run_list)
      parallel = "seq #{count} | parallel -u -j 0 -v -- "
      if provider.eql?("vsphere")
        if bundler?
          parallel += "bundle exec knife #{provider}#{Spiceweasel::Config[:knife_options]} vm clone #{options}".gsub(/\{\{n\}\}/, "{}")
        else
          parallel += "knife #{provider}#{Spiceweasel::Config[:knife_options]} vm clone #{options}".gsub(/\{\{n\}\}/, "{}")
        end
      elsif provider.eql?("kvm")
        if bundler?
          parallel += "bundle exec knife #{provider}#{Spiceweasel::Config[:knife_options]} vm create #{options}".gsub(/\{\{n\}\}/, "{}")
        else
          parallel += "knife #{provider}#{Spiceweasel::Config[:knife_options]} vm create #{options}".gsub(/\{\{n\}\}/, "{}")
        end
      elsif provider.eql?("digital_ocean")
        if bundler?
          parallel += "bundle exec knife #{provider}#{Spiceweasel::Config[:knife_options]} droplet create #{options}".gsub(/\{\{n\}\}/, "{}")
        else
          parallel += "knife #{provider}#{Spiceweasel::Config[:knife_options]} droplet create #{options}".gsub(/\{\{n\}\}/, "{}")
        end
      elsif provider.eql?("google")
        if bundler?
          parallel += "bundle exec knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{name} #{options}".gsub(/\{\{n\}\}/, "{}")
        else
          parallel += "knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{name} #{options}".gsub(/\{\{n\}\}/, "{}")
        end
      else
        if bundler?
          parallel += "bundle exec knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{options}".gsub(/\{\{n\}\}/, "{}")
        else
          parallel += "knife #{provider}#{Spiceweasel::Config[:knife_options]} server create #{options}".gsub(/\{\{n\}\}/, "{}")
        end
      end
      parallel += " -r '#{run_list}'" unless run_list.empty?
      create_command(parallel, create_command_options)
    end

    # check that the knife plugin is installed
    def validate_provider(provider, names, _count, options, knifecommands)
      unless knifecommands.index { |x| x.start_with?("knife #{provider}") }
        STDERR.puts "ERROR: 'knife #{provider}' is not a currently installed plugin for knife."
        exit(-1)
      end

      return unless provider.eql?("google")

      return unless names[1].to_i != 0 && !options.split.member?("-N")

      STDERR.puts "ERROR: 'knife google' currently requires providing a name. Please use -N within the options."
      exit(-1)
    end

    def process_chef_client(names, options, run_list) # rubocop:disable CyclomaticComplexity
      commands = []
      environment = nil
      protocol = "ssh"
      protooptions = ""
      # protocol options
      sudo = nil
      value = nil # store last option for space-separated values
      options.split.each do |opt|
        sudo = "sudo " if opt =~ /^--sudo$/
        protooptions += "--no-host-key-verify " if opt =~ /^--no-host-key-verify$/
        # SSH identity file used for authentication
        if value =~ /^-i$|^--identity-file$/
          protooptions += "-i #{opt} "
          value = nil
        end
        if opt =~ /^-i|^--identity-file/
          if opt =~ /^-i$|^--identity-file$/
            value = "-i"
          else
            opt.sub!(/-i/, "") if opt =~ /^-i/
            opt.sub!(/--identity-file/, "") if opt =~ /^--identity-file/
            protooptions += "-i #{opt} "
            value = nil
          end
        end
        # ssh gateway
        if value =~ /^-G$|^--ssh-gateway$/
          protooptions += "-G #{opt} "
          value = nil
        end
        if opt =~ /^-G|^--ssh-gateway/
          if opt =~ /^-G$|^--ssh-gateway$/
            value = "-G"
          else
            opt.sub!(/-G/, "") if opt =~ /^-G/
            opt.sub!(/--ssh-gateway/, "") if opt =~ /^--ssh-gateway/
            protooptions += "-G #{opt} "
            value = nil
          end
        end
        # ssh password
        if value =~ /^-P$|^--ssh-password$/
          protooptions += "-P #{opt} "
          value = nil
        end
        if opt =~ /^-P|^--ssh-password/
          if opt =~ /^-P$|^--ssh-password$/
            value = "-P"
          else
            opt.sub!(/-P/, "") if opt =~ /^-P/
            opt.sub!(/--ssh-password/, "") if opt =~ /^--ssh-password/
            protooptions += "-P #{opt} "
            value = nil
          end
        end
        # ssh port
        if value =~ /^-p$|^--ssh-port$/
          protooptions += "-p #{opt} "
          value = nil
        end
        if opt =~ /^-p|^--ssh-port/
          if opt =~ /^-p$|^--ssh-port$/
            value = "-p"
          else
            opt.sub!(/-p/, "") if opt =~ /^-p/
            opt.sub!(/--ssh-port/, "") if opt =~ /^--ssh-port/
            protooptions += "-p #{opt} "
            value = nil
          end
        end
        # ssh username
        if value =~ /^-x$|^--ssh-user$/
          protooptions += "-x #{opt} "
          sudo = "sudo " unless opt.eql?("root")
          value = nil
        end
        if opt =~ /^-x|^--ssh-user/
          if opt =~ /^-x$|^--ssh-user$/
            value = "-x"
          else
            opt.sub!(/-x/, "") if opt =~ /^-x/
            opt.sub!(/--ssh-user/, "") if opt =~ /^--ssh-user/
            protooptions += "-x #{opt} "
            sudo = "sudo " unless opt.eql?("root")
            value = nil
          end
        end
        # environment
        if value =~ /^-E$|^--environment$/
          environment = opt
          value = nil
        end
        if opt =~ /^-E|^--environment/
          if opt =~ /^-E$|^--environment$/
            value = "-E"
          else
            opt.sub!(/-E/, "") if opt =~ /^-E/
            opt.sub!(/--environment/, "") if opt =~ /^--environment/
            environment = opt
            value = nil
          end
        end
        # nodename
        if value =~ /^-N$|^--node-name$/
          names = [opt.gsub(/{{n}}/, "*")]
          value = nil
        end
        if opt =~ /^-N|^--node-name/
          if opt =~ /^-N$|^--node-name$/
            value = "-N"
          else
            opt.sub!(/-N|--node-name/, "") if opt =~ /^-N|^--node-name/
            names = [opt.gsub(/{{n}}/, "*")]
            value = nil
          end
        end
      end
      if names[0].start_with?("windows_")
        # windows node bootstrap support
        protocol = names.shift.split("_")[1] # split on 'windows_ssh' etc
        sudo = nil # no sudo for Windows even if ssh is used
      end
      names = [] if PROVIDERS.member?(names[0])
      # check options for -N, override name
      protooptions += "-a #{Spiceweasel::Config[:attribute]}" if Spiceweasel::Config[:attribute]
      if names.empty?
        search = chef_client_search(nil, run_list, environment)
        commands.push("knife #{protocol} '#{search}' '#{sudo}chef-client' #{protooptions} #{Spiceweasel::Config[:knife_options]}")
      else
        names.each do |name|
          search = chef_client_search(name, run_list, environment)
          commands.push("knife #{protocol} '#{search}' '#{sudo}chef-client' #{protooptions} #{Spiceweasel::Config[:knife_options]}")
        end
      end
      commands
    end

    # create the knife ssh chef-client search pattern
    def chef_client_search(name, run_list, environment)
      search = []
      search.push("name:#{name}") if name
      search.push("chef_environment:#{environment}") if environment
      run_list.split(",").each do |item|
        item.sub!(/\[/, ":")
        item.chop!
        item.sub!(/::/, '\:\:')
        search.push(item)
      end
      "#{search.join(' AND ')}"
    end

    # standardize the node run_list formatting
    def process_run_list(run_list)
      return "" if run_list.nil?
      run_list.tr!(" ", ",")
      run_list.gsub!(/,+/, ",")
      run_list
    end

    # replace the {{n}} with the zero padding number
    def node_numerate(name, num, count)
      digits = count.to_s.length + 1
      pad = sprintf("%0#{digits}i", num)
      name.gsub(/\{\{n\}\}/, pad)
    end
  end
end


text:
namespace Google.Cloud.Dialogflow.Cx.V3.Snippets
{
    // [START dialogflow_v3_generated_Flows_ListFlows_async_flattened]
    using Google.Api.Gax;
    using Google.Cloud.Dialogflow.Cx.V3;
    using System;
    using System.Linq;
    using System.Threading.Tasks;

    public sealed partial class GeneratedFlowsClientSnippets
    {
        /// <summary>Snippet for ListFlowsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListFlowsAsync()
        {
            // Create client
            FlowsClient flowsClient = await FlowsClient.CreateAsync();
            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
            // Make the request
            PagedAsyncEnumerable<ListFlowsResponse, Flow> response = flowsClient.ListFlowsAsync(parent);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Flow item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((ListFlowsResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Flow item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            });

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page<Flow> singlePage = await response.ReadPageAsync(pageSize);
            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Flow item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
        }
    }
    // [END dialogflow_v3_generated_Flows_ListFlows_async_flattened]
}


text:
#include "vgm_obj.h"
#include "vgm_obeliskfix.h"

void Nod_Obelisk_CnC::Created(GameObject* ObeliskObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Nod_Obelisk_CnC::Killed(GameObject* ObeliskObj, GameObject* Killer) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Nod_Obelisk_CnC::Custom(GameObject* ObeliskObj, int Message, int Param, GameObject* Sender) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::Created(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::Destroyed(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

bool Obelisk_Weapon_CnC::IsValidEnemy(GameObject* WeaponObj, GameObject* EnemyObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::StartFiring(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::StopFiring(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::StartEffect(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}
void Obelisk_Weapon_CnC::StopEffect(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::FireAt(GameObject* WeaponObj, GameObject* EnemyObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::StopFireAt(GameObject* WeaponObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::Timer_Expired(GameObject* WeaponObj, int Number) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::Enemy_Seen(GameObject* WeaponObj, GameObject* EnemyObj) {
	/* Due to licensing, portions of this file have been omitted. */
}

void Obelisk_Weapon_CnC::Register_Auto_Save_Variables() {
	Auto_Save_Variable(1, 4, &EnemyID);
	Auto_Save_Variable(2, 4, &EffectID);
	Auto_Save_Variable(3, 1, &Firing);
	Auto_Save_Variable(4, 1, &Charged);
}

ScriptRegistrant<Nod_Obelisk_CnC> M00_Nod_Obelisk_CnC_Registrant("M00_Nod_Obelisk_CnC", "");
ScriptRegistrant<Nod_Obelisk_CnC> Nod_Obelisk_CnC_Registrant("Nod_Obelisk_CnC", "");
ScriptRegistrant<Obelisk_Weapon_CnC> Obelisk_Weapon_CnC_Registrant("Obelisk_Weapon_CnC", "");