Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Width (0.18 sec)

  1. src/archive/tar/strconv_test.go

    		{math.MinInt64, 9, true},
    		{math.MaxInt64, 12, true},
    		{0, 12, true},
    		{math.MinInt64, 12, true},
    	}
    
    	for _, v := range vectors {
    		ok := fitsInBase256(v.width, v.in)
    		if ok != v.ok {
    			t.Errorf("fitsInBase256(%d, %d): got %v, want %v", v.in, v.width, ok, v.ok)
    		}
    	}
    }
    
    func TestParseNumeric(t *testing.T) {
    	vectors := []struct {
    		in   string
    		want int64
    		ok   bool
    	}{
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  2. internal/bpool/bpool.go

    		// buffer went back into pool
    	default:
    		// buffer didn't go back into pool, just discard
    	}
    }
    
    // Width returns the width of the byte arrays in this pool.
    func (bp *BytePoolCap) Width() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.w
    }
    
    // WidthCap returns the cap width of the byte arrays in this pool.
    func (bp *BytePoolCap) WidthCap() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.wcap
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. src/bufio/scan.go

    	// Skip leading spaces.
    	start := 0
    	for width := 0; start < len(data); start += width {
    		var r rune
    		r, width = utf8.DecodeRune(data[start:])
    		if !isSpace(r) {
    			break
    		}
    	}
    	// Scan until space, marking end of word.
    	for width, i := 0, start; i < len(data); i += width {
    		var r rune
    		r, width = utf8.DecodeRune(data[i:])
    		if isSpace(r) {
    			return i + width, data[start:i], nil
    		}
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  4. cmd/streaming-v4-unsigned.go

    			err := mustRead('\n')
    			if err != nil {
    				cr.err = err
    				return n, cr.err
    			}
    			break
    		}
    
    		// Manually deserialize the size since AWS specified
    		// the chunk size to be of variable width. In particular,
    		// a size of 16 is encoded as `10` while a size of 64 KB
    		// is `10000`.
    		switch {
    		case b >= '0' && b <= '9':
    			size = size<<4 | int(b-'0')
    		case b >= 'a' && b <= 'f':
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat May 06 02:53:12 GMT 2023
    - 6.1K bytes
    - Viewed (1)
  5. src/cmd/asm/internal/arch/arm.go

    		return true
    	}
    	return false
    }
    
    // IsARMBFX reports whether the op (as defined by an arm.A* constant) is one the
    // BFX-like instructions which are in the form of "op $width, $LSB, (Reg,) Reg".
    func IsARMBFX(op obj.As) bool {
    	switch op {
    	case arm.ABFX, arm.ABFXU, arm.ABFC, arm.ABFI:
    		return true
    	}
    	return false
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  6. internal/bpool/bpool_test.go

    // Tests - bytePool functionality.
    func TestBytePool(t *testing.T) {
    	size := uint64(4)
    	width := 1024
    	capWidth := 2048
    
    	bufPool := NewBytePoolCap(size, width, capWidth)
    
    	// Check the width
    	if bufPool.Width() != width {
    		t.Fatalf("bytepool width invalid: got %v want %v", bufPool.Width(), width)
    	}
    
    	// Check with width cap
    	if bufPool.WidthCap() != capWidth {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 19:13:27 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  7. cmd/update-notifier.go

    	maxContentWidth := max(line1Length, line2Length)
    
    	// termWidth is set to a default one to use when we are
    	// not able to calculate terminal width via OS syscalls
    	termWidth := 25
    	if width, err := pb.GetTerminalWidth(); err == nil {
    		termWidth = width
    	}
    
    	// Box cannot be printed if terminal width is small than maxContentWidth
    	if maxContentWidth > termWidth {
    		return "\n" + line1InColor + "\n" + line2InColor + "\n\n"
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. src/bytes/bytes.go

    				}
    			}
    			return -1
    		}
    	}
    	var width int
    	for i := 0; i < len(s); i += width {
    		r := rune(s[i])
    		if r < utf8.RuneSelf {
    			if bytealg.IndexByteString(chars, s[i]) >= 0 {
    				return i
    			}
    			width = 1
    			continue
    		}
    		r, width = utf8.DecodeRune(s[i:])
    		if r != utf8.RuneError {
    			// r is 2 to 4 bytes
    			if len(chars) == width {
    				if chars == string(r) {
    					return i
    				}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  9. src/bufio/bufio_test.go

    		// While not recommended, it is valid to append to a shifted buffer.
    		// This forces Write to copy the input.
    		if rn.Intn(8) == 0 && cap(b) > 0 {
    			b = b[1:1:cap(b)]
    		}
    
    		// Append a random integer of varying width.
    		n := int64(rn.Intn(1 << rn.Intn(30)))
    		want = append(strconv.AppendInt(want, n, 10), ' ')
    		b = append(strconv.AppendInt(b, n, 10), ' ')
    		w.Write(b)
    	}
    	w.Flush()
    
    	if !bytes.Equal(got.Bytes(), want) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  10. cmd/streaming-signature-v4.go

    			cr.err = err
    			return n, cr.err
    		}
    		if b == ';' { // separating character
    			break
    		}
    
    		// Manually deserialize the size since AWS specified
    		// the chunk size to be of variable width. In particular,
    		// a size of 16 is encoded as `10` while a size of 64 KB
    		// is `10000`.
    		switch {
    		case b >= '0' && b <= '9':
    			size = size<<4 | int(b-'0')
    		case b >= 'a' && b <= 'f':
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
Back to top