Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 86 for dtoi (0.05 sec)

  1. internal/config/storageclass/storage-class_test.go

    		},
    		{
    			"EC:4:5",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New("Too many sections in EC:4:5"),
    		},
    		{
    			"EC:A",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New(`strconv.Atoi: parsing "A": invalid syntax`),
    		},
    		{
    			"AB",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New("Too few sections in AB"),
    		},
    	}
    	for i, tt := range tests {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Aug 15 23:04:20 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. pilot/pkg/networking/core/route/retry/retry.go

    	for _, part := range parts {
    		part = strings.TrimSpace(part)
    		if part == "" {
    			continue
    		}
    
    		// Try converting it to an integer to see if it's a valid HTTP status code.
    		i, err := strconv.Atoi(part)
    
    		if err == nil && http.StatusText(i) != "" {
    			codes = append(codes, uint32(i))
    		} else {
    			tojoin = append(tojoin, part)
    		}
    	}
    
    	return strings.Join(tojoin, ","), codes
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 14:12:39 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. src/hash/crc32/crc32.go

    	IEEE = 0xedb88320
    
    	// Castagnoli's polynomial, used in iSCSI.
    	// Has better error detection characteristics than IEEE.
    	// https://dx.doi.org/10.1109/26.231911
    	Castagnoli = 0x82f63b78
    
    	// Koopman's polynomial.
    	// Also has better error detection characteristics than IEEE.
    	// https://dx.doi.org/10.1109/DSN.2002.1028931
    	Koopman = 0xeb31d82e
    )
    
    // Table is a 256-word table representing the polynomial for efficient processing.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  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