/*
Sets the blocky behavior in the default context.

See: http://api.zeromq.org/4-2:zmq-ctx-set#toc3

Returns ErrorNotImplemented42 with ZeroMQ version < 4.2
*/
763114
func SetBlocky(i bool) error {
	if initVersionError != nil {
		return initVersionError
	}
	if initContextError != nil {
		return initContextError
	}
	return defaultCtx.SetBlocky(i)
}
433352
func checkZMQOptions(zmqBlockHost, zmqTxHost string) error {
	if zmqBlockHost == zmqTxHost {
		return errors.New("zmqpubrawblock and zmqpubrawtx must be set" +
			"to different addresses")
	}

	return nil
}
521497
func MsgOptionBlocks(blocks ...Block) MsgOption {
	return func(config *sendConfig) error {
		if blocks == nil {
			return nil
		}

		blocks, err := json.Marshal(blocks)
		if err == nil {
			config.values.Set("blocks", string(blocks))
		}
		return err
	}
}
1346783
func (s *OrcSerDe) SetBlockSizeBytes(v int64) *OrcSerDe {
	s.BlockSizeBytes = &v
	return s
}
915396
func BlockDevices(ctx types.Context) ([]byte, error) {

	req, err := http.NewRequest(http.MethodGet, bdmURL, nil)
	if err != nil {
		return nil, err
	}

	res, err := doRequest(ctx, req)
	if err != nil {
		return nil, err
	}
	defer res.Body.Close()

	buf, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, err
	}

	return buf, nil
}
478046
func (c *ConfigLocal) SetBlockOps(b BlockOps) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.bops = b
}
604348
func ctyNullBlockSetAsEmpty(in cty.Value) cty.Value {
	if !in.IsNull() {
		return in
	}
	// Dynamically-typed attributes are not supported inside blocks backed by
	// sets, so our result here is always a set.
	return cty.SetValEmpty(in.Type().ElementType())
}
307257
func setModelBlock(mb modelBackend, t BlockType, msg string) error {
	buildTxn := func(attempt int) ([]txn.Op, error) {
		block, exists, err := getBlockForType(mb, t)
		if err != nil {
			return nil, errors.Trace(err)
		}
		// Cannot create blocks of the same type more than once per model.
		// Cannot update current blocks.
		if exists {
			return block.updateMessageOp(msg)
		}
		return createModelBlockOps(mb, t, msg)
	}
	return mb.db().Run(buildTxn)
}
576549
func (mat *T) maskedBlock(blockI, blockJ int) *mat3.T {
	var m mat3.T
	m_i := 0
	for i := 0; i < 4; i++ {
		if i == blockI {
			continue
		}
		m_j := 0
		for j := 0; j < 4; j++ {
			if j == blockJ {
				continue
			}
			m[m_i][m_j] = mat[i][j]
			m_j++
		}
		m_i++
	}
	return &m
}
560630
func NewBlockSetLimited(name string, min, max uint64, nested *Spec) *Spec {
	return BlockSetSpec(&BlockSet{
		Name:     name,
		MinItems: min,
		MaxItems: max,
		Nested:   nested,
	})
}
100982
func (opts *BlockBasedTableOptions) SetBlockCacheCompressed(cache *Cache) {
	opts.compCache = cache
	C.rocksdb_block_based_options_set_block_cache_compressed(opts.c, cache.c)
}
373779
func (s *DetectDocumentTextOutput) SetBlocks(v []*Block) *DetectDocumentTextOutput {
	s.Blocks = v
	return s
}
295041
func (me *TxsdRunTypeSequenceSequenceDataBlockSequenceFilesSequenceFileAsciiOffset) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
688328
func SetUnknowns(val cty.Value, schema *configschema.Block) cty.Value {
	if !val.IsKnown() {
		return val
	}

	// If the object was null, we still need to handle the top level attributes
	// which might be computed, but we don't need to expand the blocks.
	if val.IsNull() {
		objMap := map[string]cty.Value{}
		allNull := true
		for name, attr := range schema.Attributes {
			switch {
			case attr.Computed:
				objMap[name] = cty.UnknownVal(attr.Type)
				allNull = false
			default:
				objMap[name] = cty.NullVal(attr.Type)
			}
		}

		// If this object has no unknown attributes, then we can leave it null.
		if allNull {
			return val
		}

		return cty.ObjectVal(objMap)
	}

	valMap := val.AsValueMap()
	newVals := make(map[string]cty.Value)

	for name, attr := range schema.Attributes {
		v := valMap[name]

		if attr.Computed && v.IsNull() {
			newVals[name] = cty.UnknownVal(attr.Type)
			continue
		}

		newVals[name] = v
	}

	for name, blockS := range schema.BlockTypes {
		blockVal := valMap[name]
		if blockVal.IsNull() || !blockVal.IsKnown() {
			newVals[name] = blockVal
			continue
		}

		blockValType := blockVal.Type()
		blockElementType := blockS.Block.ImpliedType()

		// This switches on the value type here, so we can correctly switch
		// between Tuples/Lists and Maps/Objects.
		switch {
		case blockS.Nesting == configschema.NestingSingle || blockS.Nesting == configschema.NestingGroup:
			// NestingSingle is the only exception here, where we treat the
			// block directly as an object
			newVals[name] = SetUnknowns(blockVal, &blockS.Block)

		case blockValType.IsSetType(), blockValType.IsListType(), blockValType.IsTupleType():
			listVals := blockVal.AsValueSlice()
			newListVals := make([]cty.Value, 0, len(listVals))

			for _, v := range listVals {
				newListVals = append(newListVals, SetUnknowns(v, &blockS.Block))
			}

			switch {
			case blockValType.IsSetType():
				switch len(newListVals) {
				case 0:
					newVals[name] = cty.SetValEmpty(blockElementType)
				default:
					newVals[name] = cty.SetVal(newListVals)
				}
			case blockValType.IsListType():
				switch len(newListVals) {
				case 0:
					newVals[name] = cty.ListValEmpty(blockElementType)
				default:
					newVals[name] = cty.ListVal(newListVals)
				}
			case blockValType.IsTupleType():
				newVals[name] = cty.TupleVal(newListVals)
			}

		case blockValType.IsMapType(), blockValType.IsObjectType():
			mapVals := blockVal.AsValueMap()
			newMapVals := make(map[string]cty.Value)

			for k, v := range mapVals {
				newMapVals[k] = SetUnknowns(v, &blockS.Block)
			}

			switch {
			case blockValType.IsMapType():
				switch len(newMapVals) {
				case 0:
					newVals[name] = cty.MapValEmpty(blockElementType)
				default:
					newVals[name] = cty.MapVal(newMapVals)
				}
			case blockValType.IsObjectType():
				if len(newMapVals) == 0 {
					// We need to populate empty values to make a valid object.
					for attr, ty := range blockElementType.AttributeTypes() {
						newMapVals[attr] = cty.NullVal(ty)
					}
				}
				newVals[name] = cty.ObjectVal(newMapVals)
			}

		default:
			panic(fmt.Sprintf("failed to set unknown values for nested block %q:%#v", name, blockValType))
		}
	}

	return cty.ObjectVal(newVals)
}
983889
func (u *ubiTweak) setFirstBlock(value bool) {
    if value {
        u.tweak[1] |= t1FlagFirst
    } else {
        u.tweak[1] &^= t1FlagFirst
    }
}
565013
func (p *MockPeer) SetBlockHeight(blockHeight uint64) {
	p.lock.Lock()
	defer p.lock.Unlock()
	p.blockHeight = blockHeight
}
1256970
func (s *PortProbeAction) SetBlocked(v bool) *PortProbeAction {
	s.Blocked = &v
	return s
}