Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for is_zero (0.2 sec)

  1. src/net/netip/export_test.go

    	return Addr{u, z}
    }
    
    func IPv4(a, b, c, d uint8) Addr { return AddrFrom4([4]byte{a, b, c, d}) }
    
    var TestAppendToMarshal = testAppendToMarshal
    
    func (a Addr) IsZero() bool   { return a.isZero() }
    func (p Prefix) IsZero() bool { return p.isZero() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:14:15 UTC 2024
    - 730 bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    }
    
    // Now returns the current local time.
    func Now() Time {
    	return Time{time.Now()}
    }
    
    // IsZero returns true if the value is nil or time is zero.
    func (t *Time) IsZero() bool {
    	if t == nil {
    		return true
    	}
    	return t.Time.IsZero()
    }
    
    // Before reports whether the time instant t is before u.
    func (t *Time) Before(u *Time) bool {
    	if t != nil && u != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    }
    
    // NowMicro returns the current local time.
    func NowMicro() MicroTime {
    	return MicroTime{time.Now()}
    }
    
    // IsZero returns true if the value is nil or time is zero.
    func (t *MicroTime) IsZero() bool {
    	if t == nil {
    		return true
    	}
    	return t.Time.IsZero()
    }
    
    // Before reports whether the time instant t is before u.
    func (t *MicroTime) Before(u *MicroTime) bool {
    	if t != nil && u != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go

    			// skip
    		} else if strings.HasSuffix(fi.Name(), ".json") && mode == "on" {
    			// Collect reports that are ready for upload.
    			reportDate := u.uploadReportDate(fi.Name())
    			if !asof.IsZero() && !reportDate.IsZero() {
    				// If both the mode asof date and the report date are present, do the
    				// right thing...
    				//
    				// (see https://github.com/golang/go/issues/63142#issuecomment-1734025130)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc

          auto value = *attr.value_begin<APFloat>();
          return value.isNegative() && value.isInfinity();
        } else if (element_type.isInteger(1)) {
          auto value = *attr.value_begin<APInt>();
          return value.isZero();
        } else {
          auto value = *attr.value_begin<APInt>();
          return element_type.isUnsignedInteger() ? value.isMinValue()
                                                  : value.isMinSignedValue();
        }
      }
    };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. src/crypto/ecdh/nist.go

    		panic("crypto/ecdh: internal error: nistec ScalarBaseMult returned the identity")
    	}
    	return &PublicKey{
    		curve:     key.curve,
    		publicKey: publicKey,
    	}
    }
    
    // isZero returns whether a is all zeroes in constant time.
    func isZero(a []byte) bool {
    	var acc byte
    	for _, b := range a {
    		acc |= b
    	}
    	return acc == 0
    }
    
    // isLess returns whether a < b, where a and b are big-endian buffers of the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  7. src/net/netip/inlining_test.go

    		"MustParseAddr",
    		"MustParseAddrPort",
    		"MustParsePrefix",
    		"appendDecimal",
    		"appendHex",
    		"uint128.addOne",
    		"uint128.and",
    		"uint128.bitsClearedFrom",
    		"uint128.bitsSetFrom",
    		"uint128.isZero",
    		"uint128.not",
    		"uint128.or",
    		"uint128.subOne",
    		"uint128.xor",
    	}
    	switch runtime.GOARCH {
    	case "amd64", "arm64":
    		// These don't inline on 32-bit.
    		wantInlinable = append(wantInlinable,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 2K bytes
    - Viewed (0)
  8. src/compress/gzip/issue14937_test.go

    	if err != nil {
    		t.Error(err)
    		return
    	}
    	defer f.Close()
    	gz, err := NewReader(f)
    	if err != nil {
    		t.Errorf("cannot read gzip file %s: %s", path, err)
    		return
    	}
    	defer gz.Close()
    	if !gz.ModTime.IsZero() {
    		t.Errorf("gzip file %s has non-zero mtime (%s)", path, gz.ModTime)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 16:37:53 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. src/internal/poll/fd_plan9.go

    	}
    	if mode == 'w' || mode == 'r'+'w' {
    		fd.wmu.Lock()
    		defer fd.wmu.Unlock()
    		if fd.wtimer != nil {
    			fd.wtimer.Stop()
    			fd.wtimer = nil
    		}
    		fd.wtimedout = false
    	}
    	if !t.IsZero() && d > 0 {
    		// Interrupt I/O operation once timer has expired
    		if mode == 'r' || mode == 'r'+'w' {
    			var timer *time.Timer
    			timer = time.AfterFunc(d, func() {
    				fd.rmu.Lock()
    				defer fd.rmu.Unlock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. cmd/api-datatypes.go

    	time.Time
    }
    
    // MarshalXML encodes expiration date if it is non-zero and encodes
    // empty string otherwise
    func (t DeleteMarkerMTime) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if t.Time.IsZero() {
    		return nil
    	}
    	return e.EncodeElement(t.Time.Format(time.RFC3339), startElement)
    }
    
    // ObjectV object version key/versionId
    type ObjectV struct {
    	ObjectName string `xml:"Key"`
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 14 07:26:50 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top