Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 151 for dtoi (0.05 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/internal/obj/x86/obj6_test.go

    		}
    		parts := strings.SplitN(line, "\t", 3)
    		if len(parts) != 3 {
    			continue
    		}
    		n := normalize(parts[2])
    		mark_matches := marker.FindStringSubmatch(n)
    		if mark_matches != nil {
    			mark, _ = strconv.Atoi(mark_matches[1])
    			if _, ok := td.marker_to_input[mark]; !ok {
    				t.Fatalf("unexpected marker %d", mark)
    			}
    		} else if mark != -1 {
    			td.marker_to_output[mark] = append(td.marker_to_output[mark], n)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:21:30 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  7. pkg/util/procfs/procfs_linux.go

    		if err != nil {
    			return nil
    		}
    
    		for _, entry := range ls {
    			if !entry.IsDir() {
    				continue
    			}
    
    			// If the directory is not a number (i.e. not a PID), skip it
    			pid, err := strconv.Atoi(entry.Name())
    			if err != nil {
    				continue
    			}
    
    			cmdline, err := os.ReadFile(filepath.Join("/proc", entry.Name(), "cmdline"))
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 09:22:35 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. pkg/kube/apimirror/probe.go

    		return json.Marshal(intstr.StrVal)
    	default:
    		return []byte{}, fmt.Errorf("impossible IntOrString.Type")
    	}
    }
    
    func (intstr *IntOrString) IntValue() int {
    	if intstr.Type == String {
    		i, _ := strconv.Atoi(intstr.StrVal)
    		return i
    	}
    	return int(intstr.IntVal)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. cmd/kube-proxy/app/conntrack.go

    	}
    
    	return false, errors.New("no sysfs mounted")
    }
    
    func readIntStringFile(filename string) (int, error) {
    	b, err := os.ReadFile(filename)
    	if err != nil {
    		return -1, err
    	}
    	return strconv.Atoi(strings.TrimSpace(string(b)))
    }
    
    func writeIntStringFile(filename string, value int) error {
    	return os.WriteFile(filename, []byte(strconv.Itoa(value)), 0640)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. docs/vi/docs/tutorial/index.md

    ## Chạy mã
    
    Tất cả các code block có thể được sao chép và sử dụng trực tiếp (chúng thực chất là các tệp tin Python đã được kiểm thử).
    
    Để chạy bất kì ví dụ nào, sao chép code tới tệp tin `main.py`, và bắt đầu `uvicorn` với:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Sep 02 15:44:17 UTC 2023
    - 3.2K bytes
    - Viewed (0)
Back to top