// Set the value of the frequency field
339313
func (_class VMSSClass) SetFrequency(sessionID SessionRef, self VMSSRef, value VmssFrequency) (_err error) {
	_method := "VMSS.set_frequency"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMSSRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_valueArg, _err := convertEnumVmssFrequencyToXen(fmt.Sprintf("%s(%s)", _method, "value"), value)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _valueArg)
	return
}
206732
func (ts *TimeFlag) Set(value string) error {
	t, err := ParseTime(value)
	*ts = TimeFlag(t)
	return err
}
196458
func (met *Metrics) SetF(name string, value float64) {
	rounded := math.Floor(value + 0.5)
	atomic.StoreInt64(met.get(name), int64(rounded))
}
473926
func (c *Cell) SetValue(n interface{}) {
	var s string
	switch n.(type) {
	case time.Time:
		c.SetDateTime(n.(time.Time))
		return
	case int:
		c.setGeneral(fmt.Sprintf("%v", n))
		return
	case int32:
		c.setGeneral(fmt.Sprintf("%v", n))
		return
	case int64:
		c.setGeneral(fmt.Sprintf("%v", n))
		return
	case float32:
		c.setGeneral(fmt.Sprintf("%v", n))
		return
	case float64:
		c.setGeneral(fmt.Sprintf("%v", n))
		return
	case string:
		s = n.(string)
	case []byte:
		s = string(n.([]byte))
	case nil:
		s = ""
	default:
		s = fmt.Sprintf("%v", n)
	}
	c.SetString(s)
}
628528
func (dt *DbfTable) SetFieldValue(row int, fieldIndex int, value string) (err error) {

	b := []byte(dt.encoder.ConvertString(value))

	fieldLength := int(dt.fields[fieldIndex].length)

	//DEBUG

	//fmt.Printf("dt.numberOfBytesInHeader=%v\n\n", dt.numberOfBytesInHeader)
	//fmt.Printf("dt.lengthOfEachRecord=%v\n\n", dt.lengthOfEachRecord)

	// locate the offset of the field in DbfTable dataStore
	offset := int(dt.numberOfBytesInHeader)
	lengthOfRecord := int(dt.lengthOfEachRecord)

	offset = offset + (row * lengthOfRecord)

	recordOffset := 1

	for i := 0; i < len(dt.fields); i++ {
		if i == fieldIndex {
			break
		} else {
			recordOffset += int(dt.fields[i].length)
		}
	}

	dt.fillFieldWithBlanks(fieldLength, offset, recordOffset)

	// write new value
	switch dt.fields[fieldIndex].fieldType {
	case Character, Logical, Date:
		for i := 0; i < len(b) && i < fieldLength; i++ {
			dt.dataStore[offset+recordOffset+i] = b[i]
		}
	case Float, Numeric:
		for i := 0; i < fieldLength; i++ {
			// fmt.Printf("i:%v\n", i)
			if i < len(b) {
				dt.dataStore[offset+recordOffset+(fieldLength-i-1)] = b[(len(b)-1)-i]
			} else {
				break
			}
		}
	}

	return

	//fmt.Printf("field value:%#v\n", []byte(value))
	//fmt.Printf("field index:%#v\n", fieldIndex)
	//fmt.Printf("field fixedFieldLength:%v\n", dt.Fields[fieldIndex].fixedFieldLength)
	//fmt.Printf("string to byte:%#v\n", b)
}
408044
func (me *TxsdPlatformTypeChoicePacbioSmrtSequenceInstrumentModel) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
738768
func (f *FieldConfig) Set(data string) error {
	return convert(data, f.Value)
}
283051
func (l *logger) SetField(name string, value interface{}) {
	if l.fields == nil {
		l.fields = map[string]interface{}{}
	}
	l.fields[name] = value
}
509169
func (c *connection) SetValue(key string, value interface{}) {
	c.values.Set(key, value)
}
439951
func FreqToNote(freq float64) int {
	pitch := 12.0*(math.Log(freq/(440/2.0))/math.Log(2.0)) + 57.0
	return int(pitch + 0.00001)
}
123264
func SetValueFromString(f reflect.Value, value string) error {
	ft := f.Type()
	if ft.Kind() == reflect.Ptr {
		ft = ft.Elem()
		f = f.Elem()
	}

	switch ft.Kind() {
	case reflect.String:
		f.SetString(value)
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		{
			v, err := strconv.ParseInt(value, 0, ft.Bits())
			if err != nil {
				return newBadRequestf("%s is not int format", value)
			}
			f.SetInt(v)
		}
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
		{
			v, err := strconv.ParseUint(value, 0, ft.Bits())
			if err != nil {
				return newBadRequestf("%s is not uint format", value)
			}
			f.SetUint(v)
		}
	case reflect.Float32, reflect.Float64:
		{
			v, err := strconv.ParseFloat(value, ft.Bits())
			if err != nil {
				return newBadRequestf("%s is not float format", value)
			}
			f.SetFloat(v)
		}
	case reflect.Bool:
		{
			v, err := strconv.ParseBool(value)
			if err != nil {
				return newBadRequestf("%s is not bool format", value)
			}
			f.SetBool(v)
		}
	case reflect.Slice, reflect.Array:
		elem := reflect.New(ft.Elem()).Elem()
		err := SetValueFromString(elem, value)
		if err != nil {
			return err
		}
		result := reflect.New(ft).Elem()
		result = reflect.Append(result, elem)
		f.Set(result)
	default:
		return fmt.Errorf("unsupported format %s", ft.Name())
	}

	return nil
}
1082992
func (logger *Logger) SetFields(fields map[string]interface{}) {
	for k, v := range fields {
		logger.Fields[k] = v
	}
}
1174897
func (s *ServerReplicationParameters) SetFrequency(v int64) *ServerReplicationParameters {
	s.Frequency = &v
	return s
}
982392
func (f *Flag) Set(val string) error {
	if val == "" {
		return fmt.Errorf("must have an argument value")
	}

	*f = append(*f, val)
	return nil
}
136521
func (s *SliceStrings) Set(str string) error {
	fargs := func(c rune) bool {
		return c == ',' || c == ';'
	}
	// get function
	slice := strings.FieldsFunc(str, fargs)
	*s = append(*s, slice...)
	return nil
}
247174
func (d *DurationValue) Set(v string) error {
	if d.v == nil {
		d.v = new(time.Duration)
	}
	var err error
	*(d.v), err = time.ParseDuration(v)
	return err
}
103515
func (s *UpdateReplicationJobInput) SetFrequency(v int64) *UpdateReplicationJobInput {
	s.Frequency = &v
	return s
}