Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 351 for dtoi (0.07 sec)

  1. operator/pkg/util/util.go

    		}
    	} else {
    		fileList = append(fileList, path)
    	}
    	return fileList, nil
    }
    
    // ParseValue parses string into a value
    func ParseValue(valueStr string) any {
    	var value any
    	if v, err := strconv.Atoi(valueStr); err == nil {
    		value = v
    	} else if v, err := strconv.ParseFloat(valueStr, 64); err == nil {
    		value = v
    	} else if v, err := strconv.ParseBool(valueStr); err == nil {
    		value = v
    	} else {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 02 13:01:43 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/util.go

    	if err != nil {
    		return 0, err
    	}
    	if emptyListAccessor == nil {
    		return 0, fmt.Errorf("unable to extract a list accessor from %T", emptyList)
    	}
    
    	currentResourceVersion, err := strconv.Atoi(emptyListAccessor.GetResourceVersion())
    	if err != nil {
    		return 0, err
    	}
    
    	if currentResourceVersion == 0 {
    		return 0, fmt.Errorf("the current resource version must be greater than 0")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:05:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. logger/sql.go

    		sql = newSQL.String()
    	} else {
    		sql = numericPlaceholder.ReplaceAllString(sql, "$$$1$$")
    
    		sql = numericPlaceholderRe.ReplaceAllStringFunc(sql, func(v string) string {
    			num := v[1 : len(v)-1]
    			n, _ := strconv.Atoi(num)
    
    			// position var start from 1 ($1, $2)
    			n -= 1
    			if n >= 0 && n <= len(vars)-1 {
    				return vars[n]
    			}
    			return v
    		})
    	}
    
    	return sql
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 08:00:02 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. internal/s3select/csv/record.go

    // converted based on the query.
    func (r *Record) Get(name string) (*sql.Value, error) {
    	index, found := r.nameIndexMap[name]
    	if !found {
    		// Check if index.
    		if strings.HasPrefix(name, "_") {
    			idx, err := strconv.Atoi(strings.TrimPrefix(name, "_"))
    			if err != nil {
    				return nil, fmt.Errorf("column %v not found", name)
    			}
    			// The position count starts at 1.
    			idx--
    			if idx >= len(r.csvRecord) || idx < 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Sep 13 00:00:59 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram_test.go

    		if thisName != metricName {
    			continue
    		}
    		metric := mf.GetMetric()[0]
    		hist := metric.GetHistogram()
    		if hist == nil {
    			return 0, errors.New("dto.Metric has nil Histogram")
    		}
    		if hist.SampleCount == nil {
    			return 0, errors.New("dto.Histogram has nil SampleCount")
    		}
    		return int64(*hist.SampleCount), nil
    	}
    	return 0, errMetricNotFound
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 13 16:03:06 UTC 2022
    - 8.7K bytes
    - Viewed (0)
  6. pkg/config/analysis/diag/message.go

    func (m Message) ReplaceLine(l string) string {
    	colonSep := strings.Split(l, ":")
    	if len(colonSep) < 2 {
    		return l
    	}
    	_, err := strconv.Atoi(strings.TrimSpace(colonSep[len(colonSep)-1]))
    	if err == nil {
    		colonSep[len(colonSep)-1] = fmt.Sprintf("%d", m.Line)
    	}
    	return strings.Join(colonSep, ":")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 10 02:05:07 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  7. cmd/storage-rest-server.go

    	if !s.IsValid(w, r) {
    		return
    	}
    	volume := r.Form.Get(storageRESTVolume)
    	filePath := r.Form.Get(storageRESTFilePath)
    	offset, err := strconv.Atoi(r.Form.Get(storageRESTOffset))
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	length, err := strconv.Atoi(r.Form.Get(storageRESTLength))
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	if offset < 0 || length < 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  8. src/cmd/internal/objabi/flag.go

    func (c *count) String() string {
    	return fmt.Sprint(int(*c))
    }
    
    func (c *count) Set(s string) error {
    	switch s {
    	case "true":
    		*c++
    	case "false":
    		*c = 0
    	default:
    		n, err := strconv.Atoi(s)
    		if err != nil {
    			return fmt.Errorf("invalid count %q", s)
    		}
    		*c = count(n)
    	}
    	return nil
    }
    
    func (c *count) Get() interface{} {
    	return int(*c)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 10 23:08:09 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  9. cmd/background-heal-ops.go

    		}
    	}
    }
    
    func newHealRoutine() *healRoutine {
    	workers := runtime.GOMAXPROCS(0) / 2
    
    	if envHealWorkers := env.Get("_MINIO_HEAL_WORKERS", ""); envHealWorkers != "" {
    		if numHealers, err := strconv.Atoi(envHealWorkers); err != nil {
    			bugLogIf(context.Background(), fmt.Errorf("invalid _MINIO_HEAL_WORKERS value: %w", err))
    		} else {
    			workers = numHealers
    		}
    	}
    
    	if workers == 0 {
    		workers = 4
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. src/crypto/tls/bogo_shim_test.go

    		}
    		cfg.EncryptedClientHelloConfigList = echConfigList
    		cfg.MinVersion = VersionTLS13
    	}
    
    	if len(*curves) != 0 {
    		for _, curveStr := range *curves {
    			id, err := strconv.Atoi(curveStr)
    			if err != nil {
    				log.Fatalf("failed to parse curve id %q: %s", curveStr, err)
    			}
    			cfg.CurvePreferences = append(cfg.CurvePreferences, CurveID(id))
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:25:39 UTC 2024
    - 12.6K bytes
    - Viewed (0)
Back to top