Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 388 for is_zero (0.12 sec)

  1. src/net/net_test.go

    		})
    	}
    }
    
    func TestCloseWrite(t *testing.T) {
    	switch runtime.GOOS {
    	case "plan9":
    		t.Skipf("not supported on %s", runtime.GOOS)
    	}
    
    	t.Parallel()
    	deadline, _ := t.Deadline()
    	if !deadline.IsZero() {
    		// Leave 10% headroom on the deadline to report errors and clean up.
    		deadline = deadline.Add(-time.Until(deadline) / 10)
    	}
    
    	for _, network := range []string{"tcp", "unix", "unixpacket"} {
    		network := network
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 21:04:44 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/crypto/ecdh/x25519.go

    	}, nil
    }
    
    func (c *x25519Curve) ecdh(local *PrivateKey, remote *PublicKey) ([]byte, error) {
    	out := make([]byte, x25519SharedSecretSize)
    	x25519ScalarMult(out, local.privateKey, remote.publicKey)
    	if isZero(out) {
    		return nil, errors.New("crypto/ecdh: bad X25519 remote ECDH input: low order point")
    	}
    	return out, nil
    }
    
    func x25519ScalarMult(dst, scalar, point []byte) {
    	var e [32]byte
    
    	copy(e[:], scalar[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. pkg/kubelet/pod_workers.go

    func (s *podSyncStatus) IsTerminationRequested() bool { return !s.terminatingAt.IsZero() }
    func (s *podSyncStatus) IsTerminationStarted() bool   { return s.startedTerminating }
    func (s *podSyncStatus) IsTerminated() bool           { return !s.terminatedAt.IsZero() }
    func (s *podSyncStatus) IsFinished() bool             { return s.finished }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 02 13:22:37 UTC 2024
    - 74.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/mutation/common/val_test.go

    	for _, tc := range []struct {
    		name     string
    		fields   map[string]ref.Val
    		expected map[string]any
    	}{
    		{
    			name: "present",
    			fields: map[string]ref.Val{
    				"zero": types.OptionalOf(types.IntZero),
    			},
    			expected: map[string]any{
    				"zero": int64(0),
    			},
    		},
    		{
    			name: "none",
    			fields: map[string]ref.Val{
    				"absent": types.OptionalNone,
    			},
    			expected: map[string]any{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 24 00:01:35 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

    	if q.d.Dec != nil {
    		return q.d.AsCanonicalBytes(out)
    	}
    	return q.i.AsCanonicalBytes(out)
    }
    
    // IsZero returns true if the quantity is equal to zero.
    func (q *Quantity) IsZero() bool {
    	if q.d.Dec != nil {
    		return q.d.Dec.Sign() == 0
    	}
    	return q.i.value == 0
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. src/crypto/x509/root_darwin.go

    	macOS.CFArrayAppendValue(policies, sslPolicy)
    
    	trustObj, err := macOS.SecTrustCreateWithCertificates(certs, policies)
    	if err != nil {
    		return nil, err
    	}
    	defer macOS.CFRelease(trustObj)
    
    	if !opts.CurrentTime.IsZero() {
    		dateRef := macOS.TimeToCFDateRef(opts.CurrentTime)
    		defer macOS.CFRelease(dateRef)
    		if err := macOS.SecTrustSetVerifyDate(trustObj, dateRef); err != nil {
    			return nil, err
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 00:36:38 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. pkg/kubelet/active_deadline.go

    	// get the latest status to determine if it was started
    	podStatus, ok := m.podStatusProvider.GetPodStatus(pod.UID)
    	if !ok {
    		podStatus = pod.Status
    	}
    	// we have no start time so just return
    	if podStatus.StartTime.IsZero() {
    		return false
    	}
    	// determine if the deadline was exceeded
    	start := podStatus.StartTime.Time
    	duration := m.clock.Since(start)
    	allowedDuration := time.Duration(*pod.Spec.ActiveDeadlineSeconds) * time.Second
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 10 10:20:09 UTC 2021
    - 3.2K bytes
    - Viewed (0)
  8. pkg/kubelet/runtime.go

    	s.RLock()
    	defer s.RUnlock()
    	return s.cidr
    }
    
    func (s *runtimeState) runtimeErrors() error {
    	s.RLock()
    	defer s.RUnlock()
    	errs := []error{}
    	if s.lastBaseRuntimeSync.IsZero() {
    		errs = append(errs, errors.New("container runtime status check may not have completed yet"))
    	} else if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. pkg/api/v1/resource/helpers.go

    	// Add overhead to non-zero limits if requested:
    	if !opts.ExcludeOverhead && pod.Spec.Overhead != nil {
    		for name, quantity := range pod.Spec.Overhead {
    			if value, ok := limits[name]; ok && !value.IsZero() {
    				value.Add(quantity)
    				limits[name] = value
    			}
    		}
    	}
    
    	return limits
    }
    
    // addResourceList adds the resources in newList to list.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 26 13:58:16 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  10. src/syscall/zsyscall_linux_arm.go

    	var _p0 *byte
    	_p0, err = BytePtrFromString(path)
    	if err != nil {
    		return
    	}
    	var _p1 unsafe.Pointer
    	if len(buf) > 0 {
    		_p1 = unsafe.Pointer(&buf[0])
    	} else {
    		_p1 = unsafe.Pointer(&_zero)
    	}
    	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
    	n = int(r0)
    	if e1 != 0 {
    		err = errnoErr(e1)
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:49 UTC 2023
    - 38.9K bytes
    - Viewed (0)
Back to top