Search Options

Results per page
Sort
Preferred Languages
Advance

Results 191 - 200 of 351 for dtoi (0.05 sec)

  1. pkg/kubelet/kuberuntime/labels.go

    	return ""
    }
    
    func getIntValueFromLabel(labels map[string]string, label string) (int, error) {
    	if strValue, found := labels[label]; found {
    		intValue, err := strconv.Atoi(strValue)
    		if err != nil {
    			// This really should not happen. Just set value to 0 to handle this abnormal case
    			return 0, err
    		}
    		return intValue, nil
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 02:01:31 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/daemon/ProcessCrashHandlingIntegrationTest.groovy

                    if (argc != 2) {
                        printf("Expected a pid parameter, but was given %d\\n", argc - 1);
                        return 1;
                    } else {
                        pid = atoi(argv[1]);
                    }
                    pid_t getsid(pid_t pid);
                    sid = getsid(pid);
                    printf("%d\\n", sid);
                    return 0;
                }
            """)
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  3. pkg/config/security/security.go

    		info.Port = 80
    	case "https":
    		info.UseSSL = true
    		info.Port = 443
    	default:
    		return JwksInfo{}, fmt.Errorf("URI scheme %q is not supported", u.Scheme)
    	}
    
    	if u.Port() != "" {
    		info.Port, err = strconv.Atoi(u.Port())
    		if err != nil {
    			return JwksInfo{}, err
    		}
    	}
    	info.Hostname = host.Name(u.Hostname())
    	info.Scheme = u.Scheme
    
    	return info, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 07 04:43:34 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. src/mime/multipart/formdata.go

    		combineFiles = false
    		// multipartfiles.IncNonDefault() // TODO: uncomment after documenting
    	}
    	maxParts := 1000
    	if s := multipartmaxparts.Value(); s != "" {
    		if v, err := strconv.Atoi(s); err == nil && v >= 0 {
    			maxParts = v
    			multipartmaxparts.IncNonDefault()
    		}
    	}
    	maxHeaders := maxMIMEHeaders()
    
    	defer func() {
    		if file != nil {
    			if cerr := file.Close(); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/helpers_linux.go

    			return []int{}, nil
    		}
    		return nil, err
    	}
    	defer f.Close()
    
    	s := bufio.NewScanner(f)
    	out := []int{}
    	for s.Scan() {
    		if t := s.Text(); t != "" {
    			pid, err := strconv.Atoi(t)
    			if err != nil {
    				return nil, fmt.Errorf("unexpected line in %v; could not convert to pid: %v", procsFile, err)
    			}
    			out = append(out, pid)
    		}
    	}
    	return out, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 11:52:28 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/nodeports/node_ports_test.go

    )
    
    func newPod(host string, hostPortInfos ...string) *v1.Pod {
    	networkPorts := []v1.ContainerPort{}
    	for _, portInfo := range hostPortInfos {
    		splited := strings.Split(portInfo, "/")
    		hostPort, _ := strconv.Atoi(splited[2])
    
    		networkPorts = append(networkPorts, v1.ContainerPort{
    			HostIP:   splited[1],
    			HostPort: int32(hostPort),
    			Protocol: v1.Protocol(splited[0]),
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 11:02:11 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  7. pkg/kube/inject/app_probe.go

    func patchRewriteProbe(annotations map[string]string, pod *corev1.Pod, defaultPort int32) {
    	statusPort := int(defaultPort)
    	if v, f := annotations[annotation.SidecarStatusPort.Name]; f {
    		p, err := strconv.Atoi(v)
    		if err != nil {
    			log.Errorf("Invalid annotation %v=%v: %v", annotation.SidecarStatusPort.Name, v, err)
    		}
    		statusPort = p
    	}
    	for i, c := range pod.Spec.Containers {
    		// Skip sidecar container.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 04 15:06:24 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  8. pilot/pkg/networking/grpcgen/grpcecho_test.go

    		return net.Listen("tcp", "127.0.0.1:0")
    	}
    	// Start XDS server
    	cgt.ds = xds.NewFakeDiscoveryServer(t, discoveryOpts)
    	_, xdsPorts, _ := net.SplitHostPort(cgt.ds.Listener.Addr().String())
    	xdsPort, _ := strconv.Atoi(xdsPorts)
    	cgt.xdsPort = xdsPort
    	for i, s := range servers {
    		if s.namespace == "" {
    			s.namespace = "default"
    		}
    		// TODO this breaks without extra ifonfig aliases on OSX, and probably elsewhere
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope_test.go

    }
    
    func (t *testEnvelopeService) SetDisabledStatus(status bool) {
    	t.disabled = status
    }
    
    func (t *testEnvelopeService) Rotate() {
    	i, _ := strconv.Atoi(t.keyVersion)
    	t.keyVersion = strconv.FormatInt(int64(i+1), 10)
    }
    
    func newTestEnvelopeService() *testEnvelopeService {
    	return &testEnvelopeService{
    		keyVersion: "1",
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 14:23:50 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  10. src/slices/example_test.go

    	// 3 > 2: 1
    }
    
    func ExampleCompareFunc() {
    	numbers := []int{0, 43, 8}
    	strings := []string{"0", "0", "8"}
    	result := slices.CompareFunc(numbers, strings, func(n int, s string) int {
    		sn, err := strconv.Atoi(s)
    		if err != nil {
    			return 1
    		}
    		return cmp.Compare(n, sn)
    	})
    	fmt.Println(result)
    	// Output:
    	// 1
    }
    
    func ExampleContainsFunc() {
    	numbers := []int{0, 42, -10, 8}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top